[cfe-commits] r144277 - /cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu Nov 10 03:29:21 PST 2011
Author: d0k
Date: Thu Nov 10 05:29:20 2011
New Revision: 144277
URL: http://llvm.org/viewvc/llvm-project?rev=144277&view=rev
Log:
serialized diagnostics: simplify code.
Modified:
cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
Modified: cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp?rev=144277&r1=144276&r2=144277&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp (original)
+++ cfe/trunk/lib/Frontend/SerializedDiagnosticPrinter.cpp Thu Nov 10 05:29:20 2011
@@ -207,11 +207,7 @@
Record.push_back(getEmitFile(Loc));
Record.push_back(SM.getSpellingLineNumber(Loc));
Record.push_back(SM.getSpellingColumnNumber(Loc)+TokSize);
-
- std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(Loc);
- FileID FID = LocInfo.first;
- unsigned FileOffset = LocInfo.second;
- Record.push_back(FileOffset);
+ Record.push_back(SM.getFileOffset(Loc));
}
void SDiagsWriter::AddCharSourceRangeToRecord(CharSourceRange Range,
More information about the cfe-commits
mailing list