comparison dmd/declaration.h @ 136:0e28624814e8 trunk

[svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
author lindquist
date Thu, 17 Jan 2008 03:15:12 +0100
parents a7dfa0ed966c
children 7f92f477ff53
comparison
equal deleted inserted replaced
135:176bd52b3cf5 136:0e28624814e8
22 #include "mtype.h" 22 #include "mtype.h"
23 23
24 namespace llvm { 24 namespace llvm {
25 class Value; 25 class Value;
26 } 26 }
27 struct IRFunction; 27 struct IrFunction;
28 struct IRGlobal; 28 struct IrVar;
29 struct IrGlobal;
30 struct IrLocal;
31 struct IrField;
29 32
30 struct Expression; 33 struct Expression;
31 struct Statement; 34 struct Statement;
32 struct LabelDsymbol; 35 struct LabelDsymbol;
33 struct Initializer; 36 struct Initializer;
259 262
260 // Eliminate need for dynamic_cast 263 // Eliminate need for dynamic_cast
261 VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; } 264 VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; }
262 265
263 // LLVMDC 266 // LLVMDC
264 int llvmNestedIndex; 267 IrGlobal* irGlobal;
265 int llvmFieldIndex; 268 IrLocal* irLocal;
266 size_t llvmFieldIndexOffset; 269 IrField* irField;
267 bool llvmNeedsStorage; 270 bool needsStorage;
268 llvm::Constant* llvmConstInit; 271
269 IRGlobal* llvmIRGlobal; 272 IrVar* getIrVar();
273 llvm::Value*& getIrValue();
270 }; 274 };
271 275
272 /**************************************************************/ 276 /**************************************************************/
273 277
274 // This is a shell around a back end symbol 278 // This is a shell around a back end symbol
607 int cvMember(unsigned char *p); 611 int cvMember(unsigned char *p);
608 612
609 FuncDeclaration *isFuncDeclaration() { return this; } 613 FuncDeclaration *isFuncDeclaration() { return this; }
610 614
611 // llvmdc stuff 615 // llvmdc stuff
612 bool llvmQueued; 616 bool runTimeHack;
613 llvm::Value* llvmThisVar; 617 IrFunction* irFunc;
614 std::set<VarDeclaration*> llvmNestedVars; 618 std::set<VarDeclaration*> nestedVars;
615 llvm::Value* llvmNested;
616 llvm::Value* llvmArguments;
617 llvm::Value* llvmArgPtr;
618 llvm::Constant* llvmDwarfSubProgram;
619 bool llvmRunTimeHack;
620 IRFunction* llvmIRFunc;
621 llvm::Value* llvmRetArg;
622 }; 619 };
623 620
624 struct FuncAliasDeclaration : FuncDeclaration 621 struct FuncAliasDeclaration : FuncDeclaration
625 { 622 {
626 FuncDeclaration *funcalias; 623 FuncDeclaration *funcalias;