reduce nesting by rearranging branches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-07-09 05:55:04 +00:00
parent 4c388b2c9d
commit 27fde7b2bc

View File

@ -437,25 +437,20 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
// Link-once, declaration, or Weakly-linked global variables need
// non-lazily-resolved stubs
if (GV->isDeclaration() || GV->isWeakForLinker()) {
if (GV->hasHiddenVisibility()) {
if (!GV->isDeclaration() && !GV->hasCommonLinkage())
// Definition is not definitely in the current translation unit.
O << Name;
else {
HiddenGVStubs.insert(Name);
printSuffixedName(Name, "$non_lazy_ptr");
//assert(MO.getTargetFlags() == 0 || MO_PIC_BASE_OFFSET);
}
} else {
GVStubs.insert(Name);
printSuffixedName(Name, "$non_lazy_ptr");
//assert(MO.getTargetFlags() == 0 || MO_PIC_BASE_OFFSET);
}
} else {
if (!GV->isDeclaration() && !GV->isWeakForLinker()) {
O << Name;
} else if (!GV->hasHiddenVisibility()) {
GVStubs.insert(Name);
printSuffixedName(Name, "$non_lazy_ptr");
//assert(MO.getTargetFlags() == 0 || MO_PIC_BASE_OFFSET);
} else if (!GV->isDeclaration() && !GV->hasCommonLinkage())
// Definition is not definitely in the current translation unit.
O << Name;
else {
HiddenGVStubs.insert(Name);
printSuffixedName(Name, "$non_lazy_ptr");
//assert(MO.getTargetFlags() == 0 || MO_PIC_BASE_OFFSET);
}
} else {
O << Name;
}