diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-03-11 19:38:18 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-03-11 19:38:18 +0000 |
commit | af1871fa6dc916ef1ab5b4b30cf56aa134fcff19 (patch) | |
tree | ce12a03159bcde2b400976634169fbf211314ea0 /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | 19888ca8b4bfcb4aabc957de3f5dce03f84da00c (diff) |
In case of tail call size of Ins and InVals may not match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 308742b76a..ae5474d8d4 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5777,12 +5777,6 @@ TargetLowering::LowerCallTo(SDValue Chain, const Type *RetTy, "LowerCall emitted a return value for a tail call!"); assert((isTailCall || InVals.size() == Ins.size()) && "LowerCall didn't emit the correct number of values!"); - DEBUG(for (unsigned i = 0, e = Ins.size(); i != e; ++i) { - assert(InVals[i].getNode() && - "LowerCall emitted a null value!"); - assert(Ins[i].VT == InVals[i].getValueType() && - "LowerCall emitted a value with the wrong type!"); - }); // For a tail call, the return value is merely live-out and there aren't // any nodes in the DAG representing it. Return a special value to @@ -5793,6 +5787,13 @@ TargetLowering::LowerCallTo(SDValue Chain, const Type *RetTy, return std::make_pair(SDValue(), SDValue()); } + DEBUG(for (unsigned i = 0, e = Ins.size(); i != e; ++i) { + assert(InVals[i].getNode() && + "LowerCall emitted a null value!"); + assert(Ins[i].VT == InVals[i].getValueType() && + "LowerCall emitted a value with the wrong type!"); + }); + // Collect the legal value parts into potentially illegal values // that correspond to the original function's return values. ISD::NodeType AssertOp = ISD::DELETED_NODE; |