From 0206269230121e10f3f64429a5c896c41b94b495 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sun, 16 Jun 2013 21:16:51 +0200 Subject: [PATCH] Ignore StaticAssert in DtoDeclarationExp. Fixes DMD testcase 'testrightthis'. --- gen/llvmhelpers.cpp | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 53198c29..32676228 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1137,18 +1137,6 @@ DValue* DtoDeclarationExp(Dsymbol* declaration) Logger::println("FuncDeclaration"); f->codegen(Type::sir); } - // alias declaration - else if (declaration->isAliasDeclaration()) - { - Logger::println("AliasDeclaration - no work"); - // do nothing - } - // enum - else if (declaration->isEnumDeclaration()) - { - Logger::println("EnumDeclaration - no work"); - // do nothing - } // class else if (ClassDeclaration* e = declaration->isClassDeclaration()) { @@ -1195,15 +1183,12 @@ DValue* DtoDeclarationExp(Dsymbol* declaration) DtoDeclarationExp(exp->s); } } - // template - else if (declaration->isTemplateDeclaration()) - { - Logger::println("TemplateDeclaration"); - // do nothing - } else { - llvm_unreachable("Unimplemented Declaration type for DeclarationExp."); + // Do nothing for template/alias/enum declarations and static + // assertions. We cannot detect StaticAssert without RTTI, so don't + // even bother to check. + IF_LOG Logger::println("Ignoring Symbol: %s", declaration->kind()); } return 0;