Remove unused, empty Ir type.

The codegen parameter was changed to IRState instead of
removing it to set the stage for an eventual eradication
of the gIR global.
This commit is contained in:
David Nadlinger
2013-10-13 19:44:29 +02:00
parent c6cf35a012
commit 1242be25d0
27 changed files with 64 additions and 182 deletions

View File

@@ -326,7 +326,7 @@ static LLFunction* build_module_reference_and_ctor(LLConstant* moduleinfo)
return ctor;
}
llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context)
{
bool logenabled = Logger::enabled();
if (llvmForceLogging && !logenabled)
@@ -363,8 +363,6 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
// reset all IR data stored in Dsymbols
IrDsymbol::resetAll();
sir->setState(&ir);
// set target triple
ir.module->setTargetTriple(global.params.targetTriple.str());
@@ -395,7 +393,7 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
for (unsigned k=0; k < members->dim; k++) {
Dsymbol* dsym = static_cast<Dsymbol*>(members->data[k]);
assert(dsym);
dsym->codegen(sir);
dsym->codegen(&ir);
}
// for singleobj-compilation, fully emit all seen template instances
@@ -405,7 +403,7 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
{
IRState::TemplateInstanceSet::iterator it, end = ir.seenTemplateInstances.end();
for (it = ir.seenTemplateInstances.begin(); it != end; ++it)
(*it)->codegen(sir);
(*it)->codegen(&ir);
ir.seenTemplateInstances.clear();
}
}
@@ -426,8 +424,6 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
Logger::disable();
}
sir->setState(NULL);
return ir.module;
}