diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-04-10 03:15:18 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-04-10 03:15:18 +0000 |
commit | b52ba49fdbf6cdf055e8b264c18b6e594fd30dc4 (patch) | |
tree | 735346c19d733283bd1c17614bc3e76d1a140065 | |
parent | c72e08b4a95e494d3bfdf1262ea8b28f614ac40e (diff) |
Make the code slightly more palatable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154378 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 22b5ae602c..a96a99781f 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1790,7 +1790,11 @@ SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node, // isTailCall may be true since the callee does not reference caller stack // frame. Check if it's in the right position. - bool isTailCall = isInTailCallPosition(DAG, Node, InChain, TLI); + SDValue TCChain = InChain; + bool isTailCall = isInTailCallPosition(DAG, Node, TCChain, TLI); + if (isTailCall) + InChain = TCChain; + std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(InChain, RetTy, isSigned, !isSigned, false, false, 0, TLI.getLibcallCallingConv(LC), isTailCall, |