Mercurial > projects > ldc
comparison dmd/statement.h @ 1650:40bd4a0d4870
Update to work with LLVM 2.7.
Removed use of dyn_cast, llvm no compiles
without exceptions and rtti by
default. We do need exceptions for the libconfig stuff, but rtti isn't
necessary (anymore).
Debug info needs to be rewritten, as in LLVM 2.7 the format has
completely changed. To have something to look at while rewriting, the
old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means
that you have to define this to compile at the moment.
Updated tango 0.99.9 patch to include updated EH runtime code, which is
needed for LLVM 2.7 as well.
author | Tomas Lindquist Olsen |
---|---|
date | Wed, 19 May 2010 12:42:32 +0200 |
parents | 44b145be2ef5 |
children |
comparison
equal
deleted
inserted
replaced
1649:36da40ecbbe0 | 1650:40bd4a0d4870 |
---|---|
139 virtual DeclarationStatement *isDeclarationStatement() { return NULL; } | 139 virtual DeclarationStatement *isDeclarationStatement() { return NULL; } |
140 virtual CompoundStatement *isCompoundStatement() { return NULL; } | 140 virtual CompoundStatement *isCompoundStatement() { return NULL; } |
141 virtual ReturnStatement *isReturnStatement() { return NULL; } | 141 virtual ReturnStatement *isReturnStatement() { return NULL; } |
142 virtual IfStatement *isIfStatement() { return NULL; } | 142 virtual IfStatement *isIfStatement() { return NULL; } |
143 virtual CaseStatement* isCaseStatement() { return NULL; } | 143 virtual CaseStatement* isCaseStatement() { return NULL; } |
144 virtual LabelStatement* isLabelStatement() { return NULL; } | |
144 | 145 |
145 #if IN_LLVM | 146 #if IN_LLVM |
146 virtual void toNakedIR(IRState *irs); | 147 virtual void toNakedIR(IRState *irs); |
147 virtual AsmBlockStatement* endsWithAsm(); | 148 virtual AsmBlockStatement* endsWithAsm(); |
148 #endif | 149 #endif |
490 DefaultStatement *sdefault; | 491 DefaultStatement *sdefault; |
491 | 492 |
492 Array gotoCases; // array of unresolved GotoCaseStatement's | 493 Array gotoCases; // array of unresolved GotoCaseStatement's |
493 Array *cases; // array of CaseStatement's | 494 Array *cases; // array of CaseStatement's |
494 int hasNoDefault; // !=0 if no default statement | 495 int hasNoDefault; // !=0 if no default statement |
495 | 496 |
496 // LDC | 497 // LDC |
497 Statement *enclosingScopeExit; | 498 Statement *enclosingScopeExit; |
498 | 499 |
499 SwitchStatement(Loc loc, Expression *c, Statement *b); | 500 SwitchStatement(Loc loc, Expression *c, Statement *b); |
500 Statement *syntaxCopy(); | 501 Statement *syntaxCopy(); |
534 Statement *inlineScan(InlineScanState *iss); | 535 Statement *inlineScan(InlineScanState *iss); |
535 | 536 |
536 void toIR(IRState *irs); | 537 void toIR(IRState *irs); |
537 | 538 |
538 CaseStatement* isCaseStatement() { return this; } | 539 CaseStatement* isCaseStatement() { return this; } |
539 | 540 |
540 // LDC | 541 // LDC |
541 llvm::BasicBlock* bodyBB; | 542 llvm::BasicBlock* bodyBB; |
542 llvm::ConstantInt* llvmIdx; | 543 llvm::ConstantInt* llvmIdx; |
543 }; | 544 }; |
544 | 545 |
861 void toIR(IRState *irs); | 862 void toIR(IRState *irs); |
862 | 863 |
863 // LDC | 864 // LDC |
864 bool asmLabel; // for labels inside inline assembler | 865 bool asmLabel; // for labels inside inline assembler |
865 void toNakedIR(IRState *irs); | 866 void toNakedIR(IRState *irs); |
867 | |
868 LabelStatement* isLabelStatement() { return this; } | |
866 }; | 869 }; |
867 | 870 |
868 struct LabelDsymbol : Dsymbol | 871 struct LabelDsymbol : Dsymbol |
869 { | 872 { |
870 LabelStatement *statement; | 873 LabelStatement *statement; |