Mercurial > projects > ldc
comparison dmd/expression.h @ 860:7edce7e58ab1
Add more toConstElem stubs to get better error messages.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 18 Dec 2008 07:59:03 +0100 |
parents | 340acf1535d0 |
children | 330f999ade44 |
comparison
equal
deleted
inserted
replaced
859:a719f2ca3e92 | 860:7edce7e58ab1 |
---|---|
1034 Expression *buildArrayLoop(Arguments *fparams); | 1034 Expression *buildArrayLoop(Arguments *fparams); |
1035 | 1035 |
1036 int inlineCost(InlineCostState *ics); | 1036 int inlineCost(InlineCostState *ics); |
1037 Expression *doInline(InlineDoState *ids); | 1037 Expression *doInline(InlineDoState *ids); |
1038 Expression *inlineScan(InlineScanState *iss); | 1038 Expression *inlineScan(InlineScanState *iss); |
1039 | |
1040 // LDC | |
1041 virtual llvm::Constant *toConstElem(IRState *irs); | |
1039 }; | 1042 }; |
1040 | 1043 |
1041 struct ArrayLengthExp : UnaExp | 1044 struct ArrayLengthExp : UnaExp |
1042 { | 1045 { |
1043 ArrayLengthExp(Loc loc, Expression *e1); | 1046 ArrayLengthExp(Loc loc, Expression *e1); |
1105 Expression *interpret(InterState *istate); | 1108 Expression *interpret(InterState *istate); |
1106 Expression *doInline(InlineDoState *ids); | 1109 Expression *doInline(InlineDoState *ids); |
1107 void scanForNestedRef(Scope *sc); | 1110 void scanForNestedRef(Scope *sc); |
1108 | 1111 |
1109 elem *toElem(IRState *irs); | 1112 elem *toElem(IRState *irs); |
1113 // LDC | |
1114 virtual llvm::Constant *toConstElem(IRState *irs); | |
1110 }; | 1115 }; |
1111 | 1116 |
1112 /* For both i++ and i-- | 1117 /* For both i++ and i-- |
1113 */ | 1118 */ |
1114 struct PostExp : BinExp | 1119 struct PostExp : BinExp |
1514 GEPExp(Loc loc, Expression* e, Identifier* id, unsigned idx); | 1519 GEPExp(Loc loc, Expression* e, Identifier* id, unsigned idx); |
1515 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | 1520 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
1516 Expression *toLvalue(Scope *sc, Expression *e); | 1521 Expression *toLvalue(Scope *sc, Expression *e); |
1517 | 1522 |
1518 elem *toElem(IRState *irs); | 1523 elem *toElem(IRState *irs); |
1524 llvm::Constant *toConstElem(IRState *irs); | |
1519 }; | 1525 }; |
1520 | 1526 |
1521 #endif | 1527 #endif |
1522 | 1528 |
1523 /****************************************************************/ | 1529 /****************************************************************/ |