summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-04-28 19:27:33 +0000
committerDevang Patel <dpatel@apple.com>2010-04-28 19:27:33 +0000
commit888c17073ab8b7f8015162ecbd478c9c94162216 (patch)
tree6c2740c01311440e85f11c650e4c3fd2d39a598a /llvm/lib/CodeGen
parentcb2563f0c3bc44a5a9c1acb007cc79ba7ddd89d0 (diff)
downloadbcm5719-llvm-888c17073ab8b7f8015162ecbd478c9c94162216.tar.gz
bcm5719-llvm-888c17073ab8b7f8015162ecbd478c9c94162216.zip
While lowering dbg_declare, emit DBG_VALUE machine instruction if alloca matching llvm.dbg.declare intrinsic is missing.
llvm-svn: 102513
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 8aa37a06dc2..49bfbffa623 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/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: {
OpenPOWER on IntegriCloud