Removed some dead code.

Fixed assertion filenames for imported template instances. Fixes #152 .
This commit is contained in:
Tomas Lindquist Olsen
2009-02-04 02:10:23 +01:00
parent 6cd6ddd237
commit 7d2a0a84a7
6 changed files with 13 additions and 13 deletions

View File

@@ -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);