diff options
author | Eric Christopher <echristo@gmail.com> | 2012-10-18 21:52:18 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2012-10-18 21:52:18 +0000 |
commit | a2f7eb7c52cdc62d25088937b0895b9aabe11d18 (patch) | |
tree | 86e077ce6e66c2f963e4b4dddf936f2c1a787257 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 1adabcf3f54a0b1a7af22792eb389ec10d94cd8c (diff) | |
download | bcm5719-llvm-a2f7eb7c52cdc62d25088937b0895b9aabe11d18.tar.gz bcm5719-llvm-a2f7eb7c52cdc62d25088937b0895b9aabe11d18.zip |
Add a new option for and disable column number information as there
are no known current users of column info. Robustify and fix up
a few tests in the process. Reduces the size of debug information
by a small amount.
Part of PR14106
llvm-svn: 166236
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index f0c85326ec7..e6e7ecf5711 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -259,6 +259,8 @@ unsigned CGDebugInfo::getLineNumber(SourceLocation Loc) { unsigned CGDebugInfo::getColumnNumber(SourceLocation Loc) { if (Loc.isInvalid() && CurLoc.isInvalid()) return 0; + if (!CGM.getCodeGenOpts().DebugColumnInfo) + return 0; SourceManager &SM = CGM.getContext().getSourceManager(); PresumedLoc PLoc = SM.getPresumedLoc(Loc.isValid() ? Loc : CurLoc); return PLoc.isValid()? PLoc.getColumn() : 0; |