pratlucas created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
The construction of constants for structs/unions was conflicting the
expected memory layout for over-sized bit-fields. When building the
necessary bits for those fields, clang was ignoring the s
pratlucas updated this revision to Diff 253568.
pratlucas added a comment.
Formatting.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77048/new/
https://reviews.llvm.org/D77048
Files:
clang/lib/CodeGen/CGExprConstant.cpp
clang/test/CodeGenCXX/b
efriedma added inline comments.
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:613
+
+ // Add padding bits in case of over-sized bit-field.
+ // "The first sizeof(T)*8 bits are used to hold the value of the bit-field,
The existing code in ConstantAggregat
pratlucas marked 2 inline comments as done.
pratlucas added inline comments.
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:613
+
+ // Add padding bits in case of over-sized bit-field.
+ // "The first sizeof(T)*8 bits are used to hold the value of the bit-field,
-
pratlucas updated this revision to Diff 254156.
pratlucas added a comment.
Removing unecessary handling of padding bits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77048/new/
https://reviews.llvm.org/D77048
Files:
clang/lib/CodeGen/CGExprCons
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77048/new/
https://reviews.llvm.org/D77048
___
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe6cb4b659af9: [Clang][CodeGen] Fixing mismatch between
memory layout and const expressions… (authored by pratlucas).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm