Fixed calling of _d_array_bounds and _d_switch_error.

This commit is contained in:
Alexey Prokhin 2011-01-02 17:43:02 +03:00
parent 3c4db7bc87
commit a86f414bc1
7 changed files with 87 additions and 21 deletions

View file

@ -1555,9 +1555,16 @@ void SwitchErrorStatement::toIR(IRState* p)
std::vector<LLValue*> args;
#if DMDV2
// module param
LLValue *moduleInfoSymbol = gIR->func()->decl->getModule()->moduleInfoSymbol();
const LLType *moduleInfoType = DtoType(Module::moduleinfo->type);
args.push_back(DtoBitCast(moduleInfoSymbol, getPtrToType(moduleInfoType)));
#else
// file param
IrModule* irmod = getIrModule(NULL);
args.push_back(DtoLoad(irmod->fileName));
#endif
// line param
LLConstant* c = DtoConstUint(loc.linnum);