[PATCH] D76594: [clang][AST] Support AST files larger than 512M
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 16 13:56:51 PDT 2020
sammccall accepted this revision.
sammccall added a comment.
A little sad it's not possible to just 64-bit align the typeoffsets array, but 32 seems to be the magic number.
================
Comment at: clang/include/clang/Serialization/ASTBitCodes.h:225
+ /// Offset in the AST file. Split 64-bit integer into low/high parts
+ /// to keep structure alignment 32-bit and don't have padding gap.
+ /// This structure is serialized "as is" to the AST file and undefined
----------------
may be worth mentioning that blobs in bitstream are specifically 32-bit aligned as part of the motivation here.
================
Comment at: clang/include/clang/Serialization/ASTBitCodes.h:228
+ /// value in the padding affects AST hash.
+ uint32_t BitOffsetLow = 0;
+ uint32_t BitOffsetHigh = 0;
----------------
consider making this a class and these members private
================
Comment at: clang/include/clang/Serialization/ASTBitCodes.h:256
+ /// Helper structure for storing type offsets.
+ struct TypeOffset {
+ /// Offset in the AST file. Split 64-bit integer into low/high parts
----------------
Alternatively you could factor this as a class UnderalignedInt64, use that for type-offsets, and embed it in DeclOffset...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76594/new/
https://reviews.llvm.org/D76594
More information about the cfe-commits
mailing list