mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
simplify this logic a bit more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75118 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
75cdf27f48
commit
ac007b64ea
@ -4582,18 +4582,14 @@ X86TargetLowering::LowerGlobalAddress(const GlobalValue *GV, DebugLoc dl,
|
||||
|
||||
// Link-once, declaration, or Weakly-linked global variables need
|
||||
// non-lazily-resolved stubs.
|
||||
if (!GV->isDeclaration() && !GV->isWeakForLinker()) {
|
||||
if (!ExtraLoadRequired) {
|
||||
// Not a stub reference.
|
||||
OpFlags = IsPIC ? X86II::MO_PIC_BASE_OFFSET : 0;
|
||||
} else if (!GV->hasHiddenVisibility()) {
|
||||
// Non-hidden $non_lazy_ptr reference.
|
||||
OpFlags = IsPIC ? X86II::MO_DARWIN_NONLAZY_PIC_BASE :
|
||||
X86II::MO_DARWIN_NONLAZY;
|
||||
} else if (!GV->isDeclaration() && !GV->hasCommonLinkage())
|
||||
// Definition is definitely in the current linkage unit.
|
||||
// Not a stub reference.
|
||||
OpFlags = IsPIC ? X86II::MO_PIC_BASE_OFFSET : 0;
|
||||
else {
|
||||
} else {
|
||||
// Hidden $non_lazy_ptr reference.
|
||||
OpFlags = IsPIC ? X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE :
|
||||
X86II::MO_DARWIN_HIDDEN_NONLAZY;
|
||||
|
Loading…
Reference in New Issue
Block a user