summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-09-09 19:23:58 +0000
committerManman Ren <manman.ren@gmail.com>2013-09-09 19:23:58 +0000
commit33796c5e98ede9afc108580d2e02df61ea7dffb2 (patch)
tree20cbebd09d83d40e402959b698f372c6537eefd6 /llvm/lib/IR/DebugInfo.cpp
parent67de33b0757a1c0588b2351e1a045d7dde134bf3 (diff)
downloadbcm5719-llvm-33796c5e98ede9afc108580d2e02df61ea7dffb2.tar.gz
bcm5719-llvm-33796c5e98ede9afc108580d2e02df61ea7dffb2.zip
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. llvm-svn: 190330
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 4546098bc3d..dc22db3b01b 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud