mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 19:06:02 +03:00
Make CompileUnit linkage compatible with llvm trunk.
This commit is contained in:
parent
fc5f35c410
commit
c49642a08f
1 changed files with 1 additions and 1 deletions
|
@ -507,7 +507,7 @@ llvm::DICompileUnit DtoDwarfCompileUnit(Module* m)
|
||||||
// if the linkage stays internal, we can't llvm-link the generated modules together:
|
// if the linkage stays internal, we can't llvm-link the generated modules together:
|
||||||
// llvm's DwarfWriter uses path and filename to determine the symbol name and we'd
|
// llvm's DwarfWriter uses path and filename to determine the symbol name and we'd
|
||||||
// end up with duplicate symbols
|
// end up with duplicate symbols
|
||||||
m->ir.irModule->diCompileUnit.getGV()->setLinkage(llvm::GlobalValue::LinkOnceLinkage);
|
m->ir.irModule->diCompileUnit.getGV()->setLinkage(DEBUGINFO_LINKONCE_LINKAGE_TYPE);
|
||||||
m->ir.irModule->diCompileUnit.getGV()->setName(std::string("llvm.dbg.compile_unit_") + srcpath + m->srcfile->name->toChars());
|
m->ir.irModule->diCompileUnit.getGV()->setName(std::string("llvm.dbg.compile_unit_") + srcpath + m->srcfile->name->toChars());
|
||||||
|
|
||||||
return m->ir.irModule->diCompileUnit;
|
return m->ir.irModule->diCompileUnit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue