summaryrefslogtreecommitdiff
path: root/include/llvm/DebugInfo.h
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-09-09 22:35:23 +0000
committerManman Ren <manman.ren@gmail.com>2013-09-09 22:35:23 +0000
commite72aba9c0ff5b19128f54b09a36d2f4c2a53b40b (patch)
treece4a3987eb6b832a55395bf05be09aac775f2c54 /include/llvm/DebugInfo.h
parentee50a46026a8e131bd1b82df729d1c45f856d0ec (diff)
downloadllvm-e72aba9c0ff5b19128f54b09a36d2f4c2a53b40b.tar.gz
llvm-e72aba9c0ff5b19128f54b09a36d2f4c2a53b40b.tar.bz2
llvm-e72aba9c0ff5b19128f54b09a36d2f4c2a53b40b.tar.xz
Debug Info: move DIScope::getContext back from DwarfDebug.
This partially reverts r190330. DIScope::getContext now returns DIScopeRef instead of DIScope. We construct a DIScopeRef from DIScope when we are dealing with subprogram, lexical block or name space. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/DebugInfo.h')
-rw-r--r--include/llvm/DebugInfo.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index 4ea843c4ce..e9a78314bc 100644
--- a/include/llvm/DebugInfo.h
+++ b/include/llvm/DebugInfo.h
@@ -200,6 +200,9 @@ namespace llvm {
public:
explicit DIScope(const MDNode *N = 0) : DIDescriptor (N) {}
+ /// Gets the parent scope for this scope node or returns a
+ /// default constructed scope.
+ DIScopeRef getContext() const;
StringRef getFilename() const;
StringRef getDirectory() const;
@@ -213,6 +216,7 @@ namespace llvm {
class DIScopeRef {
template <typename DescTy>
friend DescTy DIDescriptor::getFieldAs(unsigned Elt) const;
+ friend DIScopeRef DIScope::getContext() const;
/// Val can be either a MDNode or a MDString, in the latter,
/// MDString specifies the type identifier.