diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-09-09 22:35:23 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-09-09 22:35:23 +0000 |
commit | e72aba9c0ff5b19128f54b09a36d2f4c2a53b40b (patch) | |
tree | ce4a3987eb6b832a55395bf05be09aac775f2c54 /include | |
parent | ee50a46026a8e131bd1b82df729d1c45f856d0ec (diff) | |
download | external_llvm-e72aba9c0ff5b19128f54b09a36d2f4c2a53b40b.zip external_llvm-e72aba9c0ff5b19128f54b09a36d2f4c2a53b40b.tar.gz external_llvm-e72aba9c0ff5b19128f54b09a36d2f4c2a53b40b.tar.bz2 |
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')
-rw-r--r-- | include/llvm/DebugInfo.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index 4ea843c..e9a7831 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. |