From 89f59b4eeb8d349c9215c112a54c5f3085582ada Mon Sep 17 00:00:00 2001 From: kai Date: Sun, 11 Aug 2013 22:02:21 +0200 Subject: [PATCH] Fix an assertion error regarding void type with LLVM 3.4. In Dwarf debug symbol generation the void type was modelled as DIType(NULL). This triggers an assertion error with LLVM 3.4. The solution is to use the unspecified type provided by Dwarf for this purpose. --- gen/dibuilder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gen/dibuilder.cpp b/gen/dibuilder.cpp index 2437f1fd..ec701c31 100644 --- a/gen/dibuilder.cpp +++ b/gen/dibuilder.cpp @@ -446,7 +446,11 @@ llvm::DIType ldc::DIBuilder::CreateTypeDescription(Type* type, } if (t->ty == Tvoid) +#if LDC_LLVM_VER >= 304 + return DBuilder.createUnspecifiedType(t->toChars()); +#else return llvm::DIType(NULL); +#endif else if (t->isintegral() || t->isfloating()) { if (t->ty == Tvector)