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 | 34164196af54ffa242e0c92af1031af079709439 (patch) | |
tree | 97f75c2f45baf1af86aa5ac41c1f62e5d63cf82b /llvm/lib/Analysis/DebugInfo.cpp | |
parent | 1b8af411168bd0f0374f346b5ac55718fbe58448 (diff) | |
download | bcm5719-llvm-34164196af54ffa242e0c92af1031af079709439.tar.gz bcm5719-llvm-34164196af54ffa242e0c92af1031af079709439.zip |
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
llvm-svn: 153916
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 8f2afad6fa5..f61a8f3a5eb 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -787,6 +787,9 @@ void DISubprogram::print(raw_ostream &OS) const { if (isDefinition()) OS << " [def] "; + if (getScopeLineNumber() != getLineNumber()) + OS << " [Scope: " << getScopeLineNumber() << "] "; + OS << "\n"; } |