diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-09-29 01:30:00 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-09-29 01:30:00 +0000 |
commit | b1c99c679adb53be8f478d08be83af6c9c22ae4b (patch) | |
tree | d4453a90ebec1c162117f522164d38ce0478ffd5 /lib/Serialization/ASTWriter.cpp | |
parent | c3c4a89747e12ebc2eabe57265c8b69ab720ecbf (diff) |
Basic/Diagnostics: Add a DiagnosticMappingInfo helper class, and switch to
storing mappings with that instead of straying some magic constants about the
source.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 5f005a0106..1232900be3 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -1815,10 +1815,9 @@ void ASTWriter::WritePragmaDiagnosticMappings(const DiagnosticsEngine &Diag) { Record.push_back(point.Loc.getRawEncoding()); for (DiagnosticsEngine::DiagState::iterator I = point.State->begin(), E = point.State->end(); I != E; ++I) { - unsigned diag = I->first, map = I->second; - if (map & 0x10) { // mapping from a diagnostic pragma. - Record.push_back(diag); - Record.push_back(map & 0x7); + if (I->second.isPragma()) { + Record.push_back(I->first); + Record.push_back(I->second.getMapping()); } } Record.push_back(-1); // mark the end of the diag/map pairs for this |