diff options
author | Devang Patel <dpatel@apple.com> | 2009-10-09 22:42:28 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-10-09 22:42:28 +0000 |
commit | 40c80212c1c0be155e7a561f0a18a94856d7eb2f (patch) | |
tree | addcad4adb847b585dd7fbaf70c16e9bdeb9300d /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | 43304d30b79b35253613e21f34375a5493f62550 (diff) | |
download | external_llvm-40c80212c1c0be155e7a561f0a18a94856d7eb2f.zip external_llvm-40c80212c1c0be155e7a561f0a18a94856d7eb2f.tar.gz external_llvm-40c80212c1c0be155e7a561f0a18a94856d7eb2f.tar.bz2 |
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index bccff16..e4ccbce 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -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 |