summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-04-01 01:09:12 +0000
committerJustin Lebar <jlebar@google.com>2016-04-01 01:09:12 +0000
commitc814e8e4ab076343d02ab425697526c193e8b3bd (patch)
tree73d27d204db743252ecbd33222670768072c36c6
parent96418481bc5994e72b851e3779a8ff5cc2d2111e (diff)
downloadbcm5719-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.cpp13
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) {
OpenPOWER on IntegriCloud