summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.h')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index 0ca274f5688..ac31bdf3f58 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -211,11 +211,17 @@ public:
/// getLocation - Return the current source location.
SourceLocation getLocation() const { return CurLoc; }
+ /// getScope() - Return the current scope.
+ llvm::MDNode *getScope() const { return LexicalBlockStack.back(); }
+
/// EmitLocation - Emit metadata to indicate a change in line/column
/// information in the source file.
/// \param ForceColumnInfo Assume DebugColumnInfo option is true.
+ /// \param ForceScope Force the location to be in a specific lexical
+ /// scope rather than the top of LexicalBlockStack.
void EmitLocation(CGBuilderTy &Builder, SourceLocation Loc,
- bool ForceColumnInfo = false);
+ bool ForceColumnInfo = false,
+ llvm::MDNode *ForceScope = 0);
/// EmitFunctionStart - Emit a call to llvm.dbg.function.start to indicate
/// start of a new function.
OpenPOWER on IntegriCloud