Mercurial > projects > ldc
comparison gen/todebug.cpp @ 1069:8038b106c458
Make CompileUnit linkage compatible with llvm trunk.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 08 Mar 2009 16:30:39 +0100 |
parents | 7db4bb9602ed |
children | 79758fd2f48a |
comparison
equal
deleted
inserted
replaced
1068:7db4bb9602ed | 1069:8038b106c458 |
---|---|
505 ); | 505 ); |
506 | 506 |
507 // if the linkage stays internal, we can't llvm-link the generated modules together: | 507 // if the linkage stays internal, we can't llvm-link the generated modules together: |
508 // llvm's DwarfWriter uses path and filename to determine the symbol name and we'd | 508 // llvm's DwarfWriter uses path and filename to determine the symbol name and we'd |
509 // end up with duplicate symbols | 509 // end up with duplicate symbols |
510 m->ir.irModule->diCompileUnit.getGV()->setLinkage(llvm::GlobalValue::LinkOnceLinkage); | 510 m->ir.irModule->diCompileUnit.getGV()->setLinkage(DEBUGINFO_LINKONCE_LINKAGE_TYPE); |
511 m->ir.irModule->diCompileUnit.getGV()->setName(std::string("llvm.dbg.compile_unit_") + srcpath + m->srcfile->name->toChars()); | 511 m->ir.irModule->diCompileUnit.getGV()->setName(std::string("llvm.dbg.compile_unit_") + srcpath + m->srcfile->name->toChars()); |
512 | 512 |
513 return m->ir.irModule->diCompileUnit; | 513 return m->ir.irModule->diCompileUnit; |
514 } | 514 } |
515 | 515 |