mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-01 18:13:18 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user