mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-15 00:21:50 +01:00
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.
This commit is contained in:
@@ -41,6 +41,7 @@ struct TemplateDeclaration;
|
||||
struct ClassDeclaration;
|
||||
struct HdrGenState;
|
||||
struct BinExp;
|
||||
struct AssignExp;
|
||||
struct InterState;
|
||||
struct OverloadSet;
|
||||
|
||||
@@ -177,6 +178,8 @@ struct Expression : Object
|
||||
virtual void cacheLvalue(IRState* irs);
|
||||
|
||||
llvm::Value* cachedLvalue;
|
||||
|
||||
virtual AssignExp* isAssignExp() { return NULL; }
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -942,7 +945,7 @@ struct DotIdExp : UnaExp
|
||||
struct DotTemplateExp : UnaExp
|
||||
{
|
||||
TemplateDeclaration *td;
|
||||
|
||||
|
||||
DotTemplateExp(Loc loc, Expression *e, TemplateDeclaration *td);
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
};
|
||||
@@ -1378,6 +1381,8 @@ struct AssignExp : BinExp
|
||||
#if IN_LLVM
|
||||
DValue* toElem(IRState* irs);
|
||||
#endif
|
||||
|
||||
AssignExp* isAssignExp() { return this; }
|
||||
};
|
||||
|
||||
#if IN_DMD
|
||||
|
||||
@@ -141,6 +141,7 @@ struct Statement : Object
|
||||
virtual ReturnStatement *isReturnStatement() { return NULL; }
|
||||
virtual IfStatement *isIfStatement() { return NULL; }
|
||||
virtual CaseStatement* isCaseStatement() { return NULL; }
|
||||
virtual LabelStatement* isLabelStatement() { return NULL; }
|
||||
|
||||
#if IN_LLVM
|
||||
virtual void toNakedIR(IRState *irs);
|
||||
@@ -492,7 +493,7 @@ struct SwitchStatement : Statement
|
||||
Array gotoCases; // array of unresolved GotoCaseStatement's
|
||||
Array *cases; // array of CaseStatement's
|
||||
int hasNoDefault; // !=0 if no default statement
|
||||
|
||||
|
||||
// LDC
|
||||
Statement *enclosingScopeExit;
|
||||
|
||||
@@ -536,7 +537,7 @@ struct CaseStatement : Statement
|
||||
void toIR(IRState *irs);
|
||||
|
||||
CaseStatement* isCaseStatement() { return this; }
|
||||
|
||||
|
||||
// LDC
|
||||
llvm::BasicBlock* bodyBB;
|
||||
llvm::ConstantInt* llvmIdx;
|
||||
@@ -863,6 +864,8 @@ struct LabelStatement : Statement
|
||||
// LDC
|
||||
bool asmLabel; // for labels inside inline assembler
|
||||
void toNakedIR(IRState *irs);
|
||||
|
||||
LabelStatement* isLabelStatement() { return this; }
|
||||
};
|
||||
|
||||
struct LabelDsymbol : Dsymbol
|
||||
|
||||
Reference in New Issue
Block a user