diff options
author | Devang Patel <dpatel@apple.com> | 2011-01-31 21:38:14 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-01-31 21:38:14 +0000 |
commit | e9a7ea68653689966417443b8ac2528c1d9d3ccf (patch) | |
tree | 34407700e2758bb5353a5ad1a0b2960b9514aafa /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 97f6d5b24136ac19d5f83c1ee9541b05f0eccebd (diff) | |
download | external_llvm-e9a7ea68653689966417443b8ac2528c1d9d3ccf.zip external_llvm-e9a7ea68653689966417443b8ac2528c1d9d3ccf.tar.gz external_llvm-e9a7ea68653689966417443b8ac2528c1d9d3ccf.tar.bz2 |
Keep track of incoming argument's location while emitting LiveIns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index ae63f2e..62ebc81 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -851,8 +851,17 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) { PrepareEHLandingPad(); // Lower any arguments needed in this block if this is the entry block. - if (LLVMBB == &Fn.getEntryBlock()) + if (LLVMBB == &Fn.getEntryBlock()) { + for (BasicBlock::const_iterator DBI = LLVMBB->begin(), DBE = LLVMBB->end(); + DBI != DBE; ++DBI) { + if (const DbgInfoIntrinsic *DI = dyn_cast<DbgInfoIntrinsic>(DBI)) { + const DebugLoc DL = DI->getDebugLoc(); + SDB->setCurDebugLoc(DL); + break; + } + } LowerArguments(LLVMBB); + } // Before doing SelectionDAG ISel, see if FastISel has been requested. if (FastIS) { |