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 | da3301eec823fe770bfa49a1cb19649506caa698 (patch) | |
tree | 73a65232b124c08da8196175ac4b1891a70ded8b /lib/CodeGen/CGDebugInfo.cpp | |
parent | 5b341da0eb6478c22b9587f03572a249ebbd00dc (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index f0c85326ec..e6e7ecf571 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/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; |