diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-05-16 23:44:12 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-05-16 23:44:12 +0000 |
commit | df68803890ecae2e8cfabdaa9122cb2ccbf5b89c (patch) | |
tree | 7fdaff0fb75b0910499a835b38a0336f4cd0b9d7 /lib/CodeGen | |
parent | 27a33ad5ce3a6ca9a5d7546b41d96e975b1e9305 (diff) | |
download | llvm-df68803890ecae2e8cfabdaa9122cb2ccbf5b89c.tar.gz llvm-df68803890ecae2e8cfabdaa9122cb2ccbf5b89c.tar.bz2 llvm-df68803890ecae2e8cfabdaa9122cb2ccbf5b89c.tar.xz |
Generate debug info for by-value struct args even if they are not used.
radar://problem/13865940
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 2ded723ca0..7072def628 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -6753,9 +6753,15 @@ void SelectionDAGISel::LowerArguments(const Function &F) { // If this argument is unused then remember its value. It is used to generate // debugging information. - if (I->use_empty() && NumValues) + if (I->use_empty() && NumValues) { SDB->setUnusedArgValue(I, InVals[i]); + // Also remember any frame index for use in FastISel. + if (FrameIndexSDNode *FI = + dyn_cast<FrameIndexSDNode>(InVals[i].getNode())) + FuncInfo->setArgumentFrameIndex(I, FI->getIndex()); + } + for (unsigned Val = 0; Val != NumValues; ++Val) { EVT VT = ValueVTs[Val]; MVT PartVT = TLI.getRegisterType(*CurDAG->getContext(), VT); |