aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-10-13 21:45:18 +0000
committerEric Christopher <echristo@apple.com>2011-10-13 21:45:18 +0000
commit73fb35003aad027492e661a3749e921b5d1ecaf9 (patch)
tree6ff3b274011c6102cbe25fda3a8a6b616d1a3401 /lib/CodeGen/CGDebugInfo.h
parent0b1b5b89cc8b63aa3192a1c94e712e8a9b1a006f (diff)
Recommit:
Start handling debug line and scope information better: Migrate most of the location setting within the larger API in CGDebugInfo and update a lot of callers. Remove the existing file/scope change machinery in UpdateLineDirectiveRegion and replace it with DILexicalBlockFile usage. Finishes off the rest of rdar://10246360 after fixing a few bugs that were exposed in gdb testsuite testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.h')
-rw-r--r--lib/CodeGen/CGDebugInfo.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h
index e6c701a9a8..a4533a83d5 100644
--- a/lib/CodeGen/CGDebugInfo.h
+++ b/lib/CodeGen/CGDebugInfo.h
@@ -64,10 +64,6 @@ class CGDebugInfo {
// the end of a function.
std::vector<unsigned> FnBeginRegionCount;
- /// LineDirectiveFiles - This stack is used to keep track of
- /// scopes introduced by #line directives.
- std::vector<const char *> LineDirectiveFiles;
-
/// DebugInfoNames - This is a storage for names that are
/// constructed on demand. For example, C++ destructors, C++ operators etc..
llvm::BumpPtrAllocator DebugInfoNames;
@@ -151,10 +147,10 @@ class CGDebugInfo {
llvm::DIFile F,
SmallVectorImpl<llvm::Value *> &EltTys);
- // UpdateLineDirectiveRegion - Update region stack only if #line directive
- // has introduced scope change.
- void UpdateLineDirectiveRegion(CGBuilderTy &Builder);
-
+ // CreateLexicalBlock - Create a new lexical block node and push it on
+ // the stack.
+ void CreateLexicalBlock(SourceLocation Loc);
+
public:
CGDebugInfo(CodeGenModule &CGM);
~CGDebugInfo();
@@ -166,7 +162,7 @@ public:
/// EmitLocation - Emit metadata to indicate a change in line/column
/// information in the source file.
- void EmitLocation(CGBuilderTy &Builder);
+ void EmitLocation(CGBuilderTy &Builder, SourceLocation Loc);
/// EmitFunctionStart - Emit a call to llvm.dbg.function.start to indicate
/// start of a new function.
@@ -182,11 +178,11 @@ public:
/// EmitLexicalBlockStart - Emit metadata to indicate the beginning of a
/// new lexical block and push the block onto the stack.
- void EmitLexicalBlockStart(CGBuilderTy &Builder);
+ void EmitLexicalBlockStart(CGBuilderTy &Builder, SourceLocation Loc);
/// EmitLexicalBlockEnd - Emit metadata to indicate the end of a new lexical
/// block and pop the current block.
- void EmitLexicalBlockEnd(CGBuilderTy &Builder);
+ void EmitLexicalBlockEnd(CGBuilderTy &Builder, SourceLocation Loc);
/// EmitDeclareOfAutoVariable - Emit call to llvm.dbg.declare for an automatic
/// variable declaration.