diff --git a/dmd/expression.c b/dmd/expression.c index 1f182ea3..f56d1f86 100644 --- a/dmd/expression.c +++ b/dmd/expression.c @@ -5800,7 +5800,10 @@ Expression *DotTemplateInstanceExp::semantic(Scope *sc) id = ti->name; s2 = s->search(loc, id, 0); if (!s2) - { error("template identifier %s is not a member of %s %s", id->toChars(), s->kind(), s->ident->toChars()); + { if (s->ident) + error("template identifier %s is not a member of %s %s", id->toChars(), s->kind(), s->ident->toChars()); + else + error("template identifier %s is not a member of %s", id->toChars(), s->kind()); goto Lerr; } s = s2; diff --git a/dmd/parse.c b/dmd/parse.c index c19c13c6..098caf23 100644 --- a/dmd/parse.c +++ b/dmd/parse.c @@ -1640,7 +1640,7 @@ Import *Parser::parseImport(Array *decldefs, int isstatic) nextToken(); } - s = new Import(loc, a, token.ident, aliasid, isstatic); + s = new Import(loc, a, id, aliasid, isstatic); decldefs->push(s); /* Look for diff --git a/gen/abi-x86-64.cpp b/gen/abi-x86-64.cpp index aff42be7..7fdbb5d0 100644 --- a/gen/abi-x86-64.cpp +++ b/gen/abi-x86-64.cpp @@ -43,6 +43,7 @@ #include "gen/llvmhelpers.h" #include "gen/abi.h" #include "gen/abi-x86-64.h" +//#include "gen/llvm-version.h" // only use is commented out. #include "ir/irfunction.h" #include @@ -401,6 +402,8 @@ namespace x86_64_D_cc { // 'fastcc' allows returns in up to two registers of each kind: DRegCount state(2, 2, 2); #if 1 //LLVM_REV < 67588 + // (If uncommenting the LLVM_REV line above, also uncomment llvm-version #include + // LLVM before trunk r67588 doesn't allow a second int to be an i1 or // i8. (See ) // Rather than complicating shouldPassStructInRegs(), just disallow diff --git a/gen/functions.cpp b/gen/functions.cpp index f8867d53..c52b3f12 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -386,11 +386,8 @@ void DtoResolveFunction(FuncDeclaration* fdecl) Logger::println("DtoResolveFunction(%s): %s", fdecl->toPrettyChars(), fdecl->loc.toChars()); LOG_SCOPE; - // queue declaration unless the function is abstract without body; - // bodyless functions in an abstract class are considered abstract - ClassDeclaration* cd = fdecl->isMember() ? fdecl->isMember()->isClassDeclaration() : NULL; - bool isabstract = fdecl->isAbstract() || (cd && cd->isAbstract()); - if (!isabstract || fdecl->fbody) + // queue declaration unless the function is abstract without body + if (!fdecl->isAbstract() || fdecl->fbody) { DtoDeclareFunction(fdecl); } diff --git a/gen/main.cpp b/gen/main.cpp index df6d68f7..6a870a06 100644 --- a/gen/main.cpp +++ b/gen/main.cpp @@ -36,6 +36,7 @@ #include "gen/linker.h" #include "gen/irstate.h" #include "gen/toobj.h" +#include "gen/llvm-version.h" #include "gen/cl_options.h" #include "gen/cl_helpers.h" diff --git a/ir/irclass.cpp b/ir/irclass.cpp index 9402c1c6..eea794e6 100644 --- a/ir/irclass.cpp +++ b/ir/irclass.cpp @@ -132,7 +132,7 @@ LLConstant * IrStruct::getVtblInit() FuncDeclaration* fd = dsym->isFuncDeclaration(); assert(fd && "vtbl entry not a function"); - if ((cd->isAbstract() || fd->isAbstract()) && !fd->fbody) + if (fd->isAbstract() && !fd->fbody) { c = getNullValue(DtoType(fd->type->pointerTo())); } @@ -332,7 +332,7 @@ llvm::GlobalVariable * IrStruct::getInterfaceVtbl(BaseClass * b, bool new_instan FuncDeclaration* fd = dsym->isFuncDeclaration(); assert(fd && "vtbl entry not a function"); - assert(!((fd->isAbstract() || cd->isAbstract()) && !fd->fbody) && + assert((!fd->isAbstract() || fd->fbody) && "null symbol in interface implementation vtable"); fd->codegen(Type::sir);