mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 08:30:47 +03:00
Workaround for LLVM bug 11479.
The LLVM module name doesn't really seem to impact much aynway.
This commit is contained in:
parent
05b9b14fa9
commit
88f08cf927
1 changed files with 7 additions and 0 deletions
|
@ -217,9 +217,16 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
|
|||
assert(!global.errors);
|
||||
|
||||
// name the module
|
||||
#if 1
|
||||
// Temporary workaround for http://llvm.org/bugs/show_bug.cgi?id=11479 –
|
||||
// just use the source file name, as it is unlikely to collide with a
|
||||
// symbol name used somewhere in the module.
|
||||
llvm::StringRef mname(srcfile->toChars());
|
||||
#else
|
||||
llvm::StringRef mname(toChars());
|
||||
if (md != 0)
|
||||
mname = md->toChars();
|
||||
#endif
|
||||
|
||||
// create a new ir state
|
||||
// TODO look at making the instance static and moving most functionality into IrModule where it belongs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue