aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorQiongsi Wu <qiongsiwu@gmail.com>2025-04-01 12:55:17 -0700
committerGitHub <noreply@github.com>2025-04-01 12:55:17 -0700
commit4a73c99329ed36712a6faa8e37aa895cfeac23ce (patch)
tree60739ab50239b801ce7aee68e8e39aa0e7f45f64 /clang/lib/Serialization/ASTWriterDecl.cpp
parent23fb048ce35f672d8db3f466a2522354bbce66e5 (diff)
downloadllvm-4a73c99329ed36712a6faa8e37aa895cfeac23ce.zip
llvm-4a73c99329ed36712a6faa8e37aa895cfeac23ce.tar.gz
llvm-4a73c99329ed36712a6faa8e37aa895cfeac23ce.tar.bz2
[clang][Modules] Fix the Size of `RecordDecl`'s `BitCodeAbbrevOp` (#133500)
https://github.com/llvm/llvm-project/pull/102040/files#diff-125f472e690aa3d973bc42aa3c5d580226c5c47661551aca2889f960681aa64dR2477 added 1 bit to `RecordDecl`'s serialization format, but did not increment its abbreviation size. This can lead to rare cases where a record may overflow if the `RecordDecl`'s `getArgPassingRestrictions()` returns something bigger than 1 (see [here](https://github.com/llvm/llvm-project/blob/b3f01a6aa45b00240cec1c64286b85d7ba87e2af/clang/lib/Serialization/ASTWriterDecl.cpp#L688)). rdar://143763558
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index a14b8cf..f377c14 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -2579,7 +2579,7 @@ void ASTWriter::WriteDeclAbbrevs() {
// RecordDecl
Abv->Add(BitCodeAbbrevOp(
BitCodeAbbrevOp::Fixed,
- 13)); // Packed Record Decl Bits: FlexibleArrayMember,
+ 14)); // Packed Record Decl Bits: FlexibleArrayMember,
// AnonymousStructUnion, hasObjectMember, hasVolatileMember,
// isNonTrivialToPrimitiveDefaultInitialize,
// isNonTrivialToPrimitiveCopy, isNonTrivialToPrimitiveDestroy,