From c49642a08f2710743b7ff746533f5bee9d682b87 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Sun, 8 Mar 2009 16:30:39 +0100 Subject: [PATCH] Make CompileUnit linkage compatible with llvm trunk. --- gen/todebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/todebug.cpp b/gen/todebug.cpp index 73cec0ac..1d1fb715 100644 --- a/gen/todebug.cpp +++ b/gen/todebug.cpp @@ -507,7 +507,7 @@ llvm::DICompileUnit DtoDwarfCompileUnit(Module* m) // 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 // 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()); return m->ir.irModule->diCompileUnit;