From e72aba9c0ff5b19128f54b09a36d2f4c2a53b40b Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Mon, 9 Sep 2013 22:35:23 +0000 Subject: 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 --- include/llvm/DebugInfo.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') 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 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. -- cgit v1.1