From 1a36f9b3948d448be69cc47772d1c1c628f634c6 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Thu, 28 Nov 2013 08:04:49 +0100 Subject: [PATCH] Replace general error with more accurate error message (does not resolve issue) --- dmd2/ctfe.h | 2 +- gen/toir.cpp | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dmd2/ctfe.h b/dmd2/ctfe.h index 975778a3..3cc07d1d 100644 --- a/dmd2/ctfe.h +++ b/dmd2/ctfe.h @@ -57,8 +57,8 @@ public: Symbol* toSymbol(); dt_t **toInstanceDt(dt_t **pdt); dt_t **toDt2(dt_t **pdt, ClassDeclaration *cd, Dts *dts); - elem *toElem(IRState *irs); #endif + elem *toElem(IRState *irs); }; /// Return index of the field, or -1 if not found diff --git a/gen/toir.cpp b/gen/toir.cpp index d2196212..915ae891 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -3150,6 +3150,21 @@ LLConstant* StructLiteralExp::toConstElem(IRState* p) return sd->ir.irAggr->createInitializerConstant(varInits); } +////////////////////////////////////////////////////////////////////////////////////////// + +DValue* ClassReferenceExp::toElem(IRState* p) +{ + IF_LOG Logger::print("ClassReferenceExp::toElem: %s @ %s\n", + toChars(), type->toChars()); + LOG_SCOPE; + + error("ClassReferenceExp::toElem is not yet implemented"); + fatal(); + return 0; +} + +////////////////////////////////////////////////////////////////////////////////////////// + llvm::Constant* ClassReferenceExp::toConstElem(IRState *p) { IF_LOG Logger::print("ClassReferenceExp::toConstElem: %s @ %s\n",