comparison dmd/expression.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
39 struct TemplateInstance; 39 struct TemplateInstance;
40 struct TemplateDeclaration; 40 struct TemplateDeclaration;
41 struct ClassDeclaration; 41 struct ClassDeclaration;
42 struct HdrGenState; 42 struct HdrGenState;
43 struct BinExp; 43 struct BinExp;
44 struct AssignExp;
44 struct InterState; 45 struct InterState;
45 struct OverloadSet; 46 struct OverloadSet;
46 47
47 enum TOK; 48 enum TOK;
48 49
175 virtual DValue* toElem(IRState* irs); 176 virtual DValue* toElem(IRState* irs);
176 virtual llvm::Constant *toConstElem(IRState *irs); 177 virtual llvm::Constant *toConstElem(IRState *irs);
177 virtual void cacheLvalue(IRState* irs); 178 virtual void cacheLvalue(IRState* irs);
178 179
179 llvm::Value* cachedLvalue; 180 llvm::Value* cachedLvalue;
181
182 virtual AssignExp* isAssignExp() { return NULL; }
180 #endif 183 #endif
181 }; 184 };
182 185
183 struct IntegerExp : Expression 186 struct IntegerExp : Expression
184 { 187 {
940 }; 943 };
941 944
942 struct DotTemplateExp : UnaExp 945 struct DotTemplateExp : UnaExp
943 { 946 {
944 TemplateDeclaration *td; 947 TemplateDeclaration *td;
945 948
946 DotTemplateExp(Loc loc, Expression *e, TemplateDeclaration *td); 949 DotTemplateExp(Loc loc, Expression *e, TemplateDeclaration *td);
947 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 950 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
948 }; 951 };
949 952
950 struct DotVarExp : UnaExp 953 struct DotVarExp : UnaExp
1376 #endif 1379 #endif
1377 1380
1378 #if IN_LLVM 1381 #if IN_LLVM
1379 DValue* toElem(IRState* irs); 1382 DValue* toElem(IRState* irs);
1380 #endif 1383 #endif
1384
1385 AssignExp* isAssignExp() { return this; }
1381 }; 1386 };
1382 1387
1383 #if IN_DMD 1388 #if IN_DMD
1384 #define ASSIGNEXP_TOELEM elem *toElem(IRState *irs); 1389 #define ASSIGNEXP_TOELEM elem *toElem(IRState *irs);
1385 #elif IN_LLVM 1390 #elif IN_LLVM