mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-31 17:19:02 +02:00
Only allocate the module file name once. Fixes #90.
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
#include "gen/llvm.h"
|
||||
#include "gen/tollvm.h"
|
||||
#include "gen/irstate.h"
|
||||
#include "ir/irmodule.h"
|
||||
|
||||
IrModule::IrModule(Module* module)
|
||||
IrModule::IrModule(Module* module, const char* srcfilename)
|
||||
{
|
||||
M = module;
|
||||
|
||||
LLConstant* slice = DtoConstString(srcfilename);
|
||||
fileName = new llvm::GlobalVariable(
|
||||
slice->getType(), true, LLGlobalValue::InternalLinkage, slice, ".modulefilename", gIR->module);
|
||||
|
||||
dwarfCompileUnit = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user