mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233568 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+1
-3
@@ -33,9 +33,7 @@ void DebugLoc::getScopeAndInlinedAt(MDNode *&Scope, MDNode *&IA) const {
|
||||
}
|
||||
|
||||
MDNode *DebugLoc::getScopeNode() const {
|
||||
if (MDNode *InlinedAt = getInlinedAt())
|
||||
return DebugLoc::getFromDILocation(InlinedAt).getScopeNode();
|
||||
return getScope();
|
||||
return cast<MDLocation>(Loc)->getInlinedAtScope();
|
||||
}
|
||||
|
||||
DebugLoc DebugLoc::getFnDebugLoc() const {
|
||||
|
||||
Reference in New Issue
Block a user