Rearrange conditionals so we don't get caught with the correct type as wrong.
authorEric Christopher <echristo@apple.com>
Thu, 27 May 2010 00:52:31 +0000 (00:52 +0000)
committerEric Christopher <echristo@apple.com>
Thu, 27 May 2010 00:52:31 +0000 (00:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104793 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MachObjectWriter.cpp

index 1de22c46ceb2cd10b4817e4912f76d7808fee50e..3207e99777a422d8164733a28c51200a584f0632 100644 (file)
@@ -612,10 +612,10 @@ public:
               Type = RIT_X86_64_GOTLoad;
             else
               Type = RIT_X86_64_GOT;
-          } else if (Modifier != MCSymbolRefExpr::VK_None) {
-            report_fatal_error("unsupported symbol modifier in relocation");
-          } else if (Modifier == MCSymbolRefExpr::VK_TLVP) {
+          }  else if (Modifier == MCSymbolRefExpr::VK_TLVP) {
             Type = RIT_X86_64_TLV;
+          }  else if (Modifier != MCSymbolRefExpr::VK_None) {
+            report_fatal_error("unsupported symbol modifier in relocation");
           } else {
             Type = RIT_X86_64_Signed;