From 53f9964b95f0eb4408db2a38ca9970fd941b2bf5 Mon Sep 17 00:00:00 2001 From: kai Date: Sat, 18 Feb 2012 18:08:26 +0100 Subject: [PATCH] Fix LDC1 compile error. --- gen/llvmhelpers.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 13a2f343..17b7119a 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -755,6 +755,7 @@ DValue* DtoCastNull(Loc& loc, DValue* val, Type* to) } } +#if DMDV2 DValue* DtoCastVector(Loc& loc, DValue* val, Type* to) { assert(val->getType()->toBasetype()->ty == Tvector); @@ -786,6 +787,7 @@ DValue* DtoCastVector(Loc& loc, DValue* val, Type* to) fatal(); } } +#endif DValue* DtoCast(Loc& loc, DValue* val, Type* to) { @@ -805,10 +807,13 @@ DValue* DtoCast(Loc& loc, DValue* val, Type* to) Logger::println("Casting from '%s' to '%s'", fromtype->toChars(), to->toChars()); LOG_SCOPE; +#if DMDV2 if (fromtype->ty == Tvector) { return DtoCastVector(loc, val, to); } - else if (fromtype->isintegral()) { + else +#endif + if (fromtype->isintegral()) { return DtoCastInt(loc, val, to); } else if (fromtype->iscomplex()) {