[llvm-commits] [llvm] r51457 - /llvm/trunk/tools/lto2/LTOModule.cpp
Dale Johannesen
dalej at apple.com
Thu May 22 17:15:11 PDT 2008
Author: johannes
Date: Thu May 22 19:15:10 2008
New Revision: 51457
URL: http://llvm.org/viewvc/llvm-project?rev=51457&view=rev
Log:
Make LTO expect common and weak to be represented differently.
Reading .bc files from before that change will no longer work.
Modified:
llvm/trunk/tools/lto2/LTOModule.cpp
Modified: llvm/trunk/tools/lto2/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto2/LTOModule.cpp?rev=51457&r1=51456&r2=51457&view=diff
==============================================================================
--- llvm/trunk/tools/lto2/LTOModule.cpp (original)
+++ llvm/trunk/tools/lto2/LTOModule.cpp Thu May 22 19:15:10 2008
@@ -191,17 +191,7 @@
// set definition part
if ( def->hasWeakLinkage() || def->hasLinkOnceLinkage() ) {
- // lvm bitcode does not differenciate between weak def data
- // and tentative definitions!
- // HACK HACK HACK
- // C++ does not use tentative definitions, but does use weak symbols
- // so guess that anything that looks like a C++ symbol is weak and others
- // are tentative definitions
- if ( (strncmp(symbolName, "__Z", 3) == 0) )
- attr |= LTO_SYMBOL_DEFINITION_WEAK;
- else {
- attr |= LTO_SYMBOL_DEFINITION_TENTATIVE;
- }
+ attr |= LTO_SYMBOL_DEFINITION_WEAK;
}
else if ( def->hasCommonLinkage()) {
attr |= LTO_SYMBOL_DEFINITION_TENTATIVE;
More information about the llvm-commits
mailing list