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 | 56cc5fdf0962e7789406ed17da35e056f8f2adf5 (patch) | |
tree | 2a8c85cdc199c9219cd6022dd7e60c7c676c5569 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | b07ec831cfd5a924367d7640217757c7c4829232 (diff) | |
download | bcm5719-llvm-56cc5fdf0962e7789406ed17da35e056f8f2adf5.tar.gz bcm5719-llvm-56cc5fdf0962e7789406ed17da35e056f8f2adf5.zip |
Keep track of incoming argument's location while emitting LiveIns.
llvm-svn: 124611
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index ae63f2e657f..62ebc81ef86 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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) { |