diff options
author | Devang Patel <dpatel@apple.com> | 2010-04-28 19:27:33 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-04-28 19:27:33 +0000 |
commit | 54fc4d6a48b32772b1a114a43e20de521257899b (patch) | |
tree | 44cdce58a8ecdb59d61b8960888d298677607224 | |
parent | 0fd109963aa86021d5b78ccddd62d80ccafdb010 (diff) | |
download | external_llvm-54fc4d6a48b32772b1a114a43e20de521257899b.zip external_llvm-54fc4d6a48b32772b1a114a43e20de521257899b.tar.gz external_llvm-54fc4d6a48b32772b1a114a43e20de521257899b.tar.bz2 |
While lowering dbg_declare, emit DBG_VALUE machine instruction if alloca matching llvm.dbg.declare intrinsic is missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102513 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 8aa37a0..49bfbff 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -342,17 +342,17 @@ bool FastISel::SelectCall(const User *I) { // Don't handle byval struct arguments or VLAs, for example. // Note that if we have a byval struct argument, fast ISel is turned off; // those are handled in SelectionDAGBuilder. - if (!AI) break; - DenseMap<const AllocaInst*, int>::iterator SI = - StaticAllocaMap.find(AI); - if (SI == StaticAllocaMap.end()) break; // VLAs. - int FI = SI->second; - if (!DI->getDebugLoc().isUnknown()) - MF.getMMI().setVariableDbgInfo(DI->getVariable(), FI, DI->getDebugLoc()); - - // Building the map above is target independent. Generating DBG_VALUE - // inline is target dependent; do this now. - (void)TargetSelectInstruction(cast<Instruction>(I)); + if (AI) { + DenseMap<const AllocaInst*, int>::iterator SI = + StaticAllocaMap.find(AI); + if (SI == StaticAllocaMap.end()) break; // VLAs. + int FI = SI->second; + if (!DI->getDebugLoc().isUnknown()) + MF.getMMI().setVariableDbgInfo(DI->getVariable(), FI, DI->getDebugLoc()); + } else + // Building the map above is target independent. Generating DBG_VALUE + // inline is target dependent; do this now. + (void)TargetSelectInstruction(cast<Instruction>(I)); return true; } case Intrinsic::dbg_value: { |