# HG changeset patch # User Christian Kamm # Date 1236526239 -3600 # Node ID 8038b106c458ace7a123f817b0d2d942dd357baf # Parent 7db4bb9602ed15b96b001f81c76c96e7b5f21143 Make CompileUnit linkage compatible with llvm trunk. diff -r 7db4bb9602ed -r 8038b106c458 gen/todebug.cpp --- a/gen/todebug.cpp Sun Mar 08 16:22:06 2009 +0100 +++ b/gen/todebug.cpp Sun Mar 08 16:30:39 2009 +0100 @@ -507,7 +507,7 @@ // 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;