From: Justin Lebar Date: Fri, 1 Apr 2016 01:09:12 +0000 (+0000) Subject: Protect some assertions with NDEBUG rather than DEBUG(). X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c814e8e4ab076343d02ab425697526c193e8b3bd;p=platform%2Fupstream%2Fllvm.git Protect some assertions with NDEBUG rather than DEBUG(). DEBUG() only runs if you pass -debug, but these assertions are generally useful. llvm-svn: 265092 --- diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 71c015d..e3acfd2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -7446,12 +7446,13 @@ TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const { return std::make_pair(SDValue(), SDValue()); } - 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!"); - }); +#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 SmallVector ReturnValues; if (!CanLowerReturn) {