mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-18 11:20:03 +00:00
Make LTO expect common and weak to be represented differently.
Reading .bc files from before that change will no longer work. llvm-svn: 51457
This commit is contained in:
parent
8df50ad902
commit
73677fe660
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user