From: Argyrios Kyrtzidis Date: Fri, 5 Nov 2010 22:20:49 +0000 (+0000) Subject: Don't write an empty DIAG_USER_MAPPINGS record. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60f7684881f9f6bc779e91212aea89d9afc723dd;p=clang Don't write an empty DIAG_USER_MAPPINGS record. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118305 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index a5977f5cfe..deb6c87efb 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -1451,7 +1451,8 @@ void ASTWriter::WriteUserDiagnosticMappings(const Diagnostic &Diag) { } } - Stream.EmitRecord(DIAG_USER_MAPPINGS, Record); + if (!Record.empty()) + Stream.EmitRecord(DIAG_USER_MAPPINGS, Record); } //===----------------------------------------------------------------------===//