diff options
-rw-r--r-- | tools/lto2/LTOModule.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/tools/lto2/LTOModule.cpp b/tools/lto2/LTOModule.cpp index 2fd29be272..c4bee714c6 100644 --- a/tools/lto2/LTOModule.cpp +++ b/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; |