WinEHPrepare.cpp: Suppress a warning for -Asserts. [-Wunused-variable]
[oota-llvm.git] / 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!");
   }
 }