From ae9a2901df41ca4ba2d274c7128ab3271581112a Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 7 Oct 2008 18:41:00 +0200 Subject: [PATCH] Implement BoolExp. --- gen/toir.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index 1bd9a745..7419579f 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -2431,13 +2431,19 @@ DValue* GEPExp::toElem(IRState* p) ////////////////////////////////////////////////////////////////////////////////////////// +DValue* BoolExp::toElem(IRState* p) +{ + return new DImValue(type, DtoBoolean(loc, e1->toElem(p))); +} + +////////////////////////////////////////////////////////////////////////////////////////// + #define STUB(x) DValue *x::toElem(IRState * p) {error("Exp type "#x" not implemented: %s", toChars()); fatal(); return 0; } STUB(Expression); STUB(DotTypeExp); STUB(TypeDotIdExp); STUB(ScopeExp); STUB(TypeExp); -STUB(BoolExp); STUB(TupleExp); #define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) {error("const Exp type "#x" not implemented: '%s' type: '%s'", toChars(), type->toChars()); fatal(); return NULL; }