reduce nesting by rearranging branches.
authorChris Lattner <sabre@nondot.org>
Thu, 9 Jul 2009 05:55:04 +0000 (05:55 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 9 Jul 2009 05:55:04 +0000 (05:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75110 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp

index 66e926aa228a47b759282883fae27293e2c11ed6..b97462918dd788a60db6c770c71236bac41155af 100644 (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;
     }