diff options
| author | Justin Lebar <jlebar@google.com> | 2016-04-01 01:09:12 +0000 |
|---|---|---|
| committer | Justin Lebar <jlebar@google.com> | 2016-04-01 01:09:12 +0000 |
| commit | c814e8e4ab076343d02ab425697526c193e8b3bd (patch) | |
| tree | 73d27d204db743252ecbd33222670768072c36c6 | |
| parent | 96418481bc5994e72b851e3779a8ff5cc2d2111e (diff) | |
| download | bcm5719-llvm-c814e8e4ab076343d02ab425697526c193e8b3bd.tar.gz bcm5719-llvm-c814e8e4ab076343d02ab425697526c193e8b3bd.zip | |
Protect some assertions with NDEBUG rather than DEBUG().
DEBUG() only runs if you pass -debug, but these assertions are generally
useful.
llvm-svn: 265092
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 71c015df520..e3acfd2436e 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<SDValue, 4> ReturnValues; if (!CanLowerReturn) { |

