diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-30 17:41:24 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-30 17:41:24 +0000 |
commit | 8f7bc7919ba426ec34f6ac9859472d722148f732 (patch) | |
tree | 1c80253862893fcf8bceae131c09b45999a47288 /llvm/lib/IR/DebugInfo.cpp | |
parent | 29e36dc0c688b2f1b1bdd4d9a319770ea83890ec (diff) | |
download | bcm5719-llvm-8f7bc7919ba426ec34f6ac9859472d722148f732.tar.gz bcm5719-llvm-8f7bc7919ba426ec34f6ac9859472d722148f732.zip |
DebugInfo: Implement MDLocation::getInlinedAtScope()
Write `MDLocation::getInlinedAtScope()` and use it to re-implement
`DebugLoc::getScopeNode()` (and simplify `DISubprogram::Verify()`).
This follows the inlined-at linked list and returns the scope of the
deepest/last location.
llvm-svn: 233568
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index ec4f95eb71f..e16ac8c20f6 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -349,9 +349,7 @@ bool DISubprogram::Verify() const { continue; // walk the inlined-at scopes - while (MDLocation *IA = DL->getInlinedAt()) - DL = IA; - MDScope *Scope = DL->getScope(); + MDScope *Scope = DL->getInlinedAtScope(); if (!Scope) return false; while (!isa<MDSubprogram>(Scope)) { |