[llvm] r265093 - Revert "Protect some assertions with NDEBUG rather than DEBUG()."

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 18:23:23 PDT 2016


Author: jlebar
Date: Thu Mar 31 20:23:23 2016
New Revision: 265093

URL: http://llvm.org/viewvc/llvm-project?rev=265093&view=rev
Log:
Revert "Protect some assertions with NDEBUG rather than DEBUG()."

This reverts r265092, because it breaks CodeGen/X86/deopt-intrinsic.ll.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=265093&r1=265092&r2=265093&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Thu Mar 31 20:23:23 2016
@@ -7446,13 +7446,12 @@ TargetLowering::LowerCallTo(TargetLoweri
     return std::make_pair(SDValue(), SDValue());
   }
 
-#ifndef NDEBUG
-  for (unsigned i = 0, e = CLI.Ins.size(); i != e; ++i) {
-    assert(InVals[i].getNode() && "LowerCall emitted a null value!");
-    assert(EVT(CLI.Ins[i].VT) == InVals[i].getValueType() &&
-           "LowerCall emitted a value with the wrong type!");
-  }
-#endif
+  DEBUG(for (unsigned i = 0, e = CLI.Ins.size(); i != e; ++i) {
+          assert(InVals[i].getNode() &&
+                 "LowerCall emitted a null value!");
+          assert(EVT(CLI.Ins[i].VT) == InVals[i].getValueType() &&
+                 "LowerCall emitted a value with the wrong type!");
+        });
 
   SmallVector<SDValue, 4> ReturnValues;
   if (!CanLowerReturn) {




More information about the llvm-commits mailing list