mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-21 14:13:20 +01:00
Only allocate the module file name once. Fixes #90.
This commit is contained in:
@@ -89,16 +89,17 @@ void Module::genobjfile(int multiobj, char** envp)
|
||||
IrDsymbol::resetAll();
|
||||
IrType::resetAll();
|
||||
|
||||
// module ir state
|
||||
// might already exist via import, just overwrite...
|
||||
this->ir.irModule = new IrModule(this);
|
||||
|
||||
// name the module
|
||||
std::string mname(toChars());
|
||||
if (md != 0)
|
||||
mname = md->toChars();
|
||||
ir.module = new llvm::Module(mname);
|
||||
|
||||
// module ir state
|
||||
// might already exist via import, just overwrite...
|
||||
//FIXME: is there a good reason for overwriting?
|
||||
this->ir.irModule = new IrModule(this, srcfile->toChars());
|
||||
|
||||
// set target stuff
|
||||
std::string target_triple(global.params.tt_arch);
|
||||
target_triple.append(global.params.tt_os);
|
||||
|
||||
Reference in New Issue
Block a user