Skip to content

Commit 5c38576

Browse files
committed
Stop serializing always-zero uint32_t
1 parent bdcb282 commit 5c38576

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

clang/include/clang/Serialization/ASTBitCodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace serialization {
4444
/// Version 4 of AST files also requires that the version control branch and
4545
/// revision match exactly, since there is no backward compatibility of
4646
/// AST files at this time.
47-
const unsigned VERSION_MAJOR = 32;
47+
const unsigned VERSION_MAJOR = 33;
4848

4949
/// AST file minor version number supported by this version of
5050
/// Clang.

clang/lib/Serialization/ASTReader.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,9 +2122,6 @@ HeaderFileInfoTrait::ReadData(internal_key_ref key, const unsigned char *d,
21222122
HFI.DirInfo = (Flags >> 1) & 0x07;
21232123
HFI.LazyControllingMacro = Reader.getGlobalIdentifierID(
21242124
M, endian::readNext<IdentifierID, llvm::endianness::little>(d));
2125-
auto Zero = endian::readNext<uint32_t, llvm::endianness::little>(d);
2126-
assert(Zero == 0);
2127-
(void)Zero;
21282125

21292126
assert((End - d) % 4 == 0 &&
21302127
"Wrong data length in HeaderFileInfo deserialization");

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,7 @@ namespace {
20012001
std::pair<unsigned, unsigned>
20022002
EmitKeyDataLength(raw_ostream& Out, key_type_ref key, data_type_ref Data) {
20032003
unsigned KeyLen = key.Filename.size() + 1 + 8 + 8;
2004-
unsigned DataLen = 1 + sizeof(IdentifierID) + 4;
2004+
unsigned DataLen = 1 + sizeof(IdentifierID);
20052005
for (auto ModInfo : Data.KnownHeaders)
20062006
if (Writer.getLocalOrImportedSubmoduleID(ModInfo.getModule()))
20072007
DataLen += 4;
@@ -2041,8 +2041,6 @@ namespace {
20412041
LE.write<IdentifierID>(
20422042
Writer.getIdentifierRef(Data.HFI.LazyControllingMacro.getPtr()));
20432043

2044-
LE.write<uint32_t>(0);
2045-
20462044
auto EmitModule = [&](Module *M, ModuleMap::ModuleHeaderRole Role) {
20472045
if (uint32_t ModID = Writer.getLocalOrImportedSubmoduleID(M)) {
20482046
uint32_t Value = (ModID << 3) | (unsigned)Role;

0 commit comments

Comments
 (0)