mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Add more toConstElem stubs to get better error messages.
This commit is contained in:
@@ -1036,6 +1036,9 @@ struct SliceExp : UnaExp
|
||||
int inlineCost(InlineCostState *ics);
|
||||
Expression *doInline(InlineDoState *ids);
|
||||
Expression *inlineScan(InlineScanState *iss);
|
||||
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
};
|
||||
|
||||
struct ArrayLengthExp : UnaExp
|
||||
@@ -1107,6 +1110,8 @@ struct IndexExp : BinExp
|
||||
void scanForNestedRef(Scope *sc);
|
||||
|
||||
elem *toElem(IRState *irs);
|
||||
// LDC
|
||||
virtual llvm::Constant *toConstElem(IRState *irs);
|
||||
};
|
||||
|
||||
/* For both i++ and i--
|
||||
@@ -1516,6 +1521,7 @@ struct GEPExp : UnaExp
|
||||
Expression *toLvalue(Scope *sc, Expression *e);
|
||||
|
||||
elem *toElem(IRState *irs);
|
||||
llvm::Constant *toConstElem(IRState *irs);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2714,6 +2714,9 @@ STUB(SymbolExp);
|
||||
|
||||
#define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) {error("const Exp type "#x" not implemented: '%s' type: '%s'", toChars(), type->toChars()); fatal(); return NULL; }
|
||||
CONSTSTUB(Expression);
|
||||
CONSTSTUB(GEPExp);
|
||||
CONSTSTUB(SliceExp);
|
||||
CONSTSTUB(IndexExp);
|
||||
CONSTSTUB(AssocArrayLiteralExp);
|
||||
|
||||
unsigned Type::totym() { return 0; }
|
||||
|
||||
Reference in New Issue
Block a user