mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 11:53:13 +01:00
Workaround for LLVM bug 11479.
The LLVM module name doesn't really seem to impact much aynway.
This commit is contained in:
@@ -217,9 +217,16 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context, Ir* sir)
|
|||||||
assert(!global.errors);
|
assert(!global.errors);
|
||||||
|
|
||||||
// name the module
|
// 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());
|
llvm::StringRef mname(toChars());
|
||||||
if (md != 0)
|
if (md != 0)
|
||||||
mname = md->toChars();
|
mname = md->toChars();
|
||||||
|
#endif
|
||||||
|
|
||||||
// create a new ir state
|
// create a new ir state
|
||||||
// TODO look at making the instance static and moving most functionality into IrModule where it belongs
|
// TODO look at making the instance static and moving most functionality into IrModule where it belongs
|
||||||
|
|||||||
Reference in New Issue
Block a user