Mercurial > projects > ldc
view ir/irvar.h @ 1214:7e5547d8e59f
Give all symbols nested in functions internal linkage, unless it's one of the
other special cases.
(for example: this shouldn't be done if the symbol in question is also nested
in a template; such symbols should get template-like linkage)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Mon, 13 Apr 2009 16:16:03 +0200 |
parents | 8699c450a1a0 |
children | 79758fd2f48a |
line wrap: on
line source
#ifndef LDC_IR_IRVAR_H #define LDC_IR_IRVAR_H #include "ir/ir.h" #include "llvm/Type.h" struct IrVar : IrBase { IrVar(VarDeclaration* var); VarDeclaration* V; llvm::Value* value; }; // represents a global variable struct IrGlobal : IrVar { IrGlobal(VarDeclaration* v); llvm::PATypeHolder type; llvm::Constant* constInit; }; // represents a local variable variable struct IrLocal : IrVar { IrLocal(VarDeclaration* v); bool byref; // Not used for -nested-ctx=array int nestedDepth; // ditto int nestedIndex; }; // represents an aggregate field variable struct IrField : IrVar { IrField(VarDeclaration* v); unsigned index; unsigned unionOffset; llvm::Constant* constInit; }; #endif