summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-05-23 00:15:10 +0000
committerDale Johannesen <dalej@apple.com>2008-05-23 00:15:10 +0000
commit5b74efd723f87963d41d5dbf4d1ebbab54307281 (patch)
tree976c6b62d45cca39d3c4b3eac2379342da5787b5 /llvm
parent7a0566b9cdb04386934a0a679097d6e66bc261ec (diff)
downloadbcm5719-llvm-5b74efd723f87963d41d5dbf4d1ebbab54307281.tar.gz
bcm5719-llvm-5b74efd723f87963d41d5dbf4d1ebbab54307281.zip
Make LTO expect common and weak to be represented differently.
Reading .bc files from before that change will no longer work. llvm-svn: 51457
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/lto2/LTOModule.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/llvm/tools/lto2/LTOModule.cpp b/llvm/tools/lto2/LTOModule.cpp
index 2fd29be272a..c4bee714c6c 100644
--- a/llvm/tools/lto2/LTOModule.cpp
+++ b/llvm/tools/lto2/LTOModule.cpp
@@ -191,17 +191,7 @@ void LTOModule::addDefinedSymbol(GlobalValue* def, Mangler &mangler,
// 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;
OpenPOWER on IntegriCloud