mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-19 22:33:13 +01:00
Merge
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 <cassert>
|
||||
@@ -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 <http://llvm.org/PR3861>)
|
||||
// Rather than complicating shouldPassStructInRegs(), just disallow
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user