summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-09-09 19:47:11 +0000
committerManman Ren <manman.ren@gmail.com>2013-09-09 19:47:11 +0000
commit116868eaddccd6080ca0c564c6d7e44ebebcb3c9 (patch)
treef968356b1270e7622ee41ab446dccab2ba7b7c0f /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent7a8b6ca2d16c529dfa3e3f1188ec070454850b6f (diff)
downloadbcm5719-llvm-116868eaddccd6080ca0c564c6d7e44ebebcb3c9.tar.gz
bcm5719-llvm-116868eaddccd6080ca0c564c6d7e44ebebcb3c9.zip
Debug Info: Use DIScopeRef for DIType::getContext.
In DIBuilder, the context field of a TAG_member is updated to use the scope reference. Verifier is updated accordingly. DebugInfoFinder now needs to generate a type identifier map to have access to the actual scope. Same applies for BreakpointPrinter. processModule of DebugInfoFinder is called during initialization phase of the verifier to make sure the type identifier map is constructed early enough. We are now able to unique a simple class as demonstrated by the added testing case. llvm-svn: 190334
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 1cfadc91e03..21f997ea489 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud