diff options
author | Eric Christopher <echristo@apple.com> | 2012-04-03 00:43:49 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-04-03 00:43:49 +0000 |
commit | 6126a1e1894f346fae02a514a20aa56b879aeb99 (patch) | |
tree | 90020f4ae9c553e541af88f9042d207db017533b /include | |
parent | 2e267ae7b8caf7192a3793eb3b78937ff83f794d (diff) | |
download | llvm-6126a1e1894f346fae02a514a20aa56b879aeb99.tar.gz llvm-6126a1e1894f346fae02a514a20aa56b879aeb99.tar.bz2 llvm-6126a1e1894f346fae02a514a20aa56b879aeb99.tar.xz |
Add a line number for the scope of the function (starting at the first
brace) so that we get more accurate line number information about the
declaration of a given function and the line where the function
first starts.
Part of rdar://11026482
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/DIBuilder.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/DebugInfo.h | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DIBuilder.h b/include/llvm/Analysis/DIBuilder.h index 9fbbe09cca..2d109cdbf0 100644 --- a/include/llvm/Analysis/DIBuilder.h +++ b/include/llvm/Analysis/DIBuilder.h @@ -445,6 +445,7 @@ namespace llvm { /// @param Ty Function type. /// @param isLocalToUnit True if this function is not externally visible.. /// @param isDefinition True if this is a function definition. + /// @param ScopeLine Set to the beginning of the scope this starts /// @param Flags e.g. is this function prototyped or not. /// This flags are used to emit dwarf attributes. /// @param isOptimized True if optimization is ON. @@ -455,6 +456,7 @@ namespace llvm { DIFile File, unsigned LineNo, DIType Ty, bool isLocalToUnit, bool isDefinition, + unsigned ScopeLine, unsigned Flags = 0, bool isOptimized = false, Function *Fn = 0, diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index 8ed8f949e7..894c5428b9 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -519,6 +519,7 @@ namespace llvm { DICompositeType getContainingType() const { return getFieldAs<DICompositeType>(13); } + unsigned isArtificial() const { if (getVersion() <= llvm::LLVMDebugVersion8) return getUnsignedField(14); @@ -567,6 +568,11 @@ namespace llvm { return getFieldAs<DIFile>(6).getDirectory(); } + /// getScopeLineNumber - Get the beginning of the scope of the + /// function, not necessarily where the name of the program + /// starts. + unsigned getScopeLineNumber() const { return getUnsignedField(20); } + /// Verify - Verify that a subprogram descriptor is well formed. bool Verify() const; |