From a2f7eb7c52cdc62d25088937b0895b9aabe11d18 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 18 Oct 2012 21:52:18 +0000 Subject: 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 --- clang/lib/CodeGen/CGDebugInfo.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp') 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; -- cgit v1.2.3