mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-10 12:59:21 +03:00
Fixed file name in imported mixins containing assertions.
This commit is contained in:
parent
b6a6391116
commit
617861ead4
5 changed files with 15 additions and 8 deletions
|
@ -128,9 +128,16 @@ void DtoAssert(Module* M, Loc loc, DValue* msg)
|
|||
// file param
|
||||
|
||||
// we might be generating for an imported template function
|
||||
const char* cur_file = M->srcfile->name->toChars();
|
||||
if (loc.filename && strcmp(loc.filename, cur_file) != 0)
|
||||
{
|
||||
args.push_back(DtoConstString(loc.filename));
|
||||
}
|
||||
else
|
||||
{
|
||||
IrModule* irmod = getIrModule(M);
|
||||
|
||||
args.push_back(DtoLoad(irmod->fileName));
|
||||
}
|
||||
|
||||
// line param
|
||||
LLConstant* c = DtoConstUint(loc.linnum);
|
||||
|
@ -794,7 +801,7 @@ void DtoConstInitGlobal(VarDeclaration* vd)
|
|||
if (vd->ir.initialized) return;
|
||||
vd->ir.initialized = gIR->dmodule;
|
||||
|
||||
Logger::println("DtoConstInitGlobal(%s) @ %s", vd->toChars(), vd->locToChars());
|
||||
Logger::println("DtoConstInitGlobal(%s) @ %s", vd->toChars(), vd->loc.toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
Dsymbol* par = vd->toParent();
|
||||
|
|
|
@ -30,7 +30,7 @@ void DtoResolveStruct(StructDeclaration* sd)
|
|||
sd->ir.resolved = true;
|
||||
|
||||
// log what we're doing
|
||||
Logger::println("Resolving struct type: %s (%s)", sd->toChars(), sd->locToChars());
|
||||
Logger::println("Resolving struct type: %s (%s)", sd->toChars(), sd->loc.toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
// make sure type exists
|
||||
|
|
|
@ -252,7 +252,7 @@ LLConstant * IrStruct::createClassDefaultInitializer()
|
|||
ClassDeclaration* cd = aggrdecl->isClassDeclaration();
|
||||
assert(cd && "invalid class aggregate");
|
||||
|
||||
IF_LOG Logger::println("Building class default initializer %s @ %s", cd->toPrettyChars(), cd->locToChars());
|
||||
IF_LOG Logger::println("Building class default initializer %s @ %s", cd->toPrettyChars(), cd->loc.toChars());
|
||||
LOG_SCOPE;
|
||||
IF_LOG Logger::println("Instance size: %u", cd->structsize);
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ void IrTypeClass::addBaseClassData(
|
|||
|
||||
const llvm::Type* IrTypeClass::buildType()
|
||||
{
|
||||
IF_LOG Logger::println("Building class type %s @ %s", cd->toPrettyChars(), cd->locToChars());
|
||||
IF_LOG Logger::println("Building class type %s @ %s", cd->toPrettyChars(), cd->loc.toChars());
|
||||
LOG_SCOPE;
|
||||
IF_LOG Logger::println("Instance size: %u", cd->structsize);
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ bool var_offset_sort_cb(const VarDeclaration* v1, const VarDeclaration* v2)
|
|||
const llvm::Type* IrTypeStruct::buildType()
|
||||
{
|
||||
IF_LOG Logger::println("Building struct type %s @ %s",
|
||||
sd->toPrettyChars(), sd->locToChars());
|
||||
sd->toPrettyChars(), sd->loc.toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
// if it's a forward declaration, all bets are off, stick with the opaque
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue