summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 1cfadc91e0..21f997ea48 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -341,7 +341,7 @@ bool DwarfDebug::isSubprogramContext(const MDNode *Context) {
if (D.isSubprogram())
return true;
if (D.isType())
- return isSubprogramContext(DIType(Context).getContext());
+ return isSubprogramContext(resolve(DIType(Context).getContext()));
return false;
}
@@ -2656,7 +2656,7 @@ DIScope DwarfDebug::resolve(DIScopeRef SRef) const {
DIScope DwarfDebug::getScopeContext(DIScope S) const {
if (S.isType())
- return DIType(S).getContext();
+ return resolve(DIType(S).getContext());
if (S.isSubprogram())
return DISubprogram(S).getContext();