mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
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
This commit is contained in:
parent
0fd109963a
commit
54fc4d6a48
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user