mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 08:33:14 +01:00
Removed some dead code.
Fixed assertion filenames for imported template instances. Fixes #152 .
This commit is contained in:
@@ -109,7 +109,7 @@ llvm::AllocaInst* DtoAlloca(const LLType* lltype, LLValue* arraysize, const std:
|
||||
// ASSERT HELPER
|
||||
////////////////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
void DtoAssert(Loc* loc, DValue* msg)
|
||||
void DtoAssert(Module* M, Loc* loc, DValue* msg)
|
||||
{
|
||||
std::vector<LLValue*> args;
|
||||
|
||||
@@ -124,7 +124,12 @@ void DtoAssert(Loc* loc, DValue* msg)
|
||||
}
|
||||
|
||||
// file param
|
||||
args.push_back(DtoLoad(gIR->dmodule->ir.irModule->fileName));
|
||||
|
||||
// we might be generating for an imported template function
|
||||
if (!M->ir.irModule)
|
||||
M->ir.irModule = new IrModule(M, M->srcfile->toChars());
|
||||
|
||||
args.push_back(DtoLoad(M->ir.irModule->fileName));
|
||||
|
||||
// line param
|
||||
LLConstant* c = DtoConstUint(loc->linnum);
|
||||
|
||||
Reference in New Issue
Block a user