changeset 866:cd87b3f15ccf

Automated merge with http://hg.dsource.org/projects/ldc
author Christian Kamm <kamm incasoftware de>
date Sat, 20 Dec 2008 09:15:46 +0100
parents 6c850977a941 (current diff) 5e5873d847f6 (diff)
children 766267808f11
files
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dmd2/expression.h	Thu Dec 18 19:24:33 2008 +0100
+++ b/dmd2/expression.h	Sat Dec 20 09:15:46 2008 +0100
@@ -1080,6 +1080,9 @@
     int inlineCost(InlineCostState *ics);
     Expression *doInline(InlineDoState *ids);
     Expression *inlineScan(InlineScanState *iss);
+
+    // LDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 struct ArrayLengthExp : UnaExp
@@ -1154,6 +1157,9 @@
     void scanForNestedRef(Scope *sc);
 
     elem *toElem(IRState *irs);
+
+    // LDC
+    virtual llvm::Constant *toConstElem(IRState *irs);
 };
 
 /* For both i++ and i--
@@ -1565,6 +1571,7 @@
     Expression *toLvalue(Scope *sc, Expression *e);
 
     elem *toElem(IRState *irs);
+    llvm::Constant *toConstElem(IRState *irs);
 };
 
 #endif
--- a/gen/toir.cpp	Thu Dec 18 19:24:33 2008 +0100
+++ b/gen/toir.cpp	Sat Dec 20 09:15:46 2008 +0100
@@ -2712,7 +2712,7 @@
 STUB(SymbolExp);
 #endif
 
-#define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) {error("const Exp type "#x" not implemented: '%s' type: '%s'", toChars(), type->toChars()); fatal(); return NULL; }
+#define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) {error("non-const expression '%s' or const Exp type "#x" not implemented", toChars()); fatal(); return NULL; }
 CONSTSTUB(Expression);
 CONSTSTUB(GEPExp);
 CONSTSTUB(SliceExp);