diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-09-09 19:23:58 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-09-09 19:23:58 +0000 |
commit | 18eb245a2e5ec41b5da1367d5f7e7619532f7ceb (patch) | |
tree | 1115d0d84744f4e8df50462657e47e050609effd /lib/IR/DebugInfo.cpp | |
parent | db3a9e64f856e3a233a427da1f3969fd3a65a438 (diff) | |
download | llvm-18eb245a2e5ec41b5da1367d5f7e7619532f7ceb.tar.gz llvm-18eb245a2e5ec41b5da1367d5f7e7619532f7ceb.tar.bz2 llvm-18eb245a2e5ec41b5da1367d5f7e7619532f7ceb.tar.xz |
Debug Info: move DIScope::getContext to DwarfDebug.
DIScope::getContext is a wrapper function that calls the specific getContext
method on each subclass. When we switch DIType::getContext to return DIScopeRef
instead of DIScope, DIScope::getContext can no longer return a DIScope without
a type identifier map.
DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug
to have easy access to the type identifier map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DebugInfo.cpp')
-rw-r--r-- | lib/IR/DebugInfo.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index 4546098bc3..dc22db3b01 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -779,29 +779,6 @@ Value *DITemplateValueParameter::getValue() const { return getField(DbgNode, 4); } -// If the current node has a parent scope then return that, -// else return an empty scope. -DIScope DIScope::getContext() const { - - if (isType()) - return DIType(DbgNode).getContext(); - - if (isSubprogram()) - return DISubprogram(DbgNode).getContext(); - - if (isLexicalBlock()) - return DILexicalBlock(DbgNode).getContext(); - - if (isLexicalBlockFile()) - return DILexicalBlockFile(DbgNode).getContext(); - - if (isNameSpace()) - return DINameSpace(DbgNode).getContext(); - - assert((isFile() || isCompileUnit()) && "Unhandled type of scope."); - return DIScope(); -} - StringRef DIScope::getFilename() const { if (!DbgNode) return StringRef(); |