mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-04 06:26:28 +00:00
Extract scope information from the variable itself, instead of relying on alloca or llvm.dbg.declare location.
While recording beginning of a function, use scope info from the first location entry instead of just relying on first location entry itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83684 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -417,14 +417,8 @@ bool FastISel::SelectCall(User *I) {
|
||||
StaticAllocaMap.find(AI);
|
||||
if (SI == StaticAllocaMap.end()) break; // VLAs.
|
||||
int FI = SI->second;
|
||||
if (MMI) {
|
||||
MetadataContext &TheMetadata = AI->getContext().getMetadata();
|
||||
unsigned MDDbgKind = TheMetadata.getMDKind("dbg");
|
||||
MDNode *AllocaLocation =
|
||||
dyn_cast_or_null<MDNode>(TheMetadata.getMD(MDDbgKind, AI));
|
||||
if (AllocaLocation)
|
||||
MMI->setVariableDbgInfo(DI->getVariable(), AllocaLocation, FI);
|
||||
}
|
||||
if (MMI)
|
||||
MMI->setVariableDbgInfo(DI->getVariable(), FI);
|
||||
#ifndef ATTACH_DEBUG_INFO_TO_AN_INSN
|
||||
DW->RecordVariable(DI->getVariable(), FI);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user