WinEHPrepare.cpp: Suppress a warning for -Asserts. [-Wunused-variable]
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 3 Jan 2016 01:41:00 +0000 (01:41 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 3 Jan 2016 01:41:00 +0000 (01:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256694 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/WinEHPrepare.cpp

index 3d1c38031946a2c7bcfcdc9f24d604f8e59df41a..27043b577e2804747af4b9c576d138f43d84140c 100644 (file)
@@ -906,10 +906,8 @@ void WinEHPrepare::verifyPreparedFunclets(Function &F) {
       report_fatal_error("Uncolored BB!");
     if (NumColors > 1)
       report_fatal_error("Multicolor BB!");
-    if (!DisableDemotion) {
-      bool EHPadHasPHI = BB.isEHPad() && isa<PHINode>(BB.begin());
-      assert(!EHPadHasPHI && "EH Pad still has a PHI!");
-    }
+    assert((DisableDemotion || !(BB.isEHPad() && isa<PHINode>(BB.begin()))) &&
+           "EH Pad still has a PHI!");
   }
 }