mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 03:59:12 +00:00
Revert 60689. It caused many regressions on Darwin targets.
llvm-svn: 60705
This commit is contained in:
parent
164f7f4a43
commit
5bca97fc4f
@ -40,8 +40,6 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV,
|
||||
if (TM.getRelocationModel() != Reloc::Static &&
|
||||
TM.getCodeModel() != CodeModel::Large) {
|
||||
if (isTargetDarwin()) {
|
||||
if (!isDirectCall)
|
||||
return false;
|
||||
bool isDecl = GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode();
|
||||
if (GV->hasHiddenVisibility() &&
|
||||
(Is64Bit || (!isDecl && !GV->hasCommonLinkage())))
|
||||
@ -49,7 +47,7 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV,
|
||||
// target is x86-64 or the symbol is definitely defined in the current
|
||||
// translation unit.
|
||||
return false;
|
||||
return isDecl || GV->mayBeOverridden();
|
||||
return !isDirectCall && (isDecl || GV->mayBeOverridden());
|
||||
} else if (isTargetELF()) {
|
||||
// Extra load is needed for all externally visible.
|
||||
if (isDirectCall)
|
||||
|
Loading…
Reference in New Issue
Block a user