r300021 - Serialization: Skip check in WritePragmaDiagnosticMappings, NFC

Duncan P. N. Exon Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 11 19:31:17 PDT 2017


Author: dexonsmith
Date: Tue Apr 11 21:31:17 2017
New Revision: 300021

URL: http://llvm.org/viewvc/llvm-project?rev=300021&view=rev
Log:
Serialization: Skip check in WritePragmaDiagnosticMappings, NFC

The record is never empty, since we always serialize the initial state.
Skip the check.

Modified:
    cfe/trunk/lib/Serialization/ASTWriter.cpp

Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=300021&r1=300020&r2=300021&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Tue Apr 11 21:31:17 2017
@@ -2904,8 +2904,7 @@ void ASTWriter::WritePragmaDiagnosticMap
     }
   }
 
-  if (!Record.empty())
-    Stream.EmitRecord(DIAG_PRAGMA_MAPPINGS, Record);
+  Stream.EmitRecord(DIAG_PRAGMA_MAPPINGS, Record);
 }
 
 //===----------------------------------------------------------------------===//




More information about the cfe-commits mailing list