summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.h
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-07-24 20:34:39 +0000
committerAdrian Prantl <aprantl@apple.com>2013-07-24 20:34:39 +0000
commit49a78563d207183bda27e5756464f7c6ae64e289 (patch)
tree7c2dc7f0aa954ddb139e4279a5cace400b2584d8 /clang/lib/CodeGen/CGDebugInfo.h
parentd801711efbb45201a0499d01644fab2822242390 (diff)
downloadbcm5719-llvm-49a78563d207183bda27e5756464f7c6ae64e289.tar.gz
bcm5719-llvm-49a78563d207183bda27e5756464f7c6ae64e289.zip
Debug Info: Fix an oversight of r186553. Ensure that the function prologue
of an artificial function gets an artificial location as well. llvm-svn: 187074
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.h')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index 6eeb911d21e..b090c4d3bf5 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -407,9 +407,11 @@ public:
/// an artificial debug location that has a valid scope, but no line
/// information. This is useful when emitting compiler-generated
/// helper functions that have no source location associated with
-/// them.
+/// them. The DWARF specification allows the compiler to use the
+/// special line number 0 to indicate code that can not be attributed
+/// to any source location.
///
-/// This is necessary because pasing an empty SourceLocation to
+/// This is necessary because passing an empty SourceLocation to
/// CGDebugInfo::setLocation() will result in the last valid location
/// being reused.
class ArtificialLocation {
@@ -418,7 +420,12 @@ class ArtificialLocation {
CGBuilderTy &Builder;
public:
ArtificialLocation(CodeGenFunction &CGF, CGBuilderTy &B);
- /// ~BuildinLocation - Autorestore everything back to normal.
+
+ /// Set the current location to line 0, but within the current scope
+ /// (= the top of the LexicalScopeStack).
+ void Emit();
+
+ /// ~ArtificialLocation - Autorestore everything back to normal.
~ArtificialLocation();
};
OpenPOWER on IntegriCloud