Protect some assertions with NDEBUG rather than DEBUG().

DEBUG() only runs if you pass -debug, but these assertions are generally
useful.

llvm-svn: 265092
This commit is contained in:
Justin Lebar 2016-04-01 01:09:12 +00:00
parent 96418481bc
commit c814e8e4ab
1 changed files with 7 additions and 6 deletions

View File

@ -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) {