[clang][bytecode] Handle bitcasts involving bitfields (#116843)
commit4b5e7fa4de54e00df007ae5e2675393fd046aa59
authorTimm Baeder <tbaeder@redhat.com>
Wed, 4 Dec 2024 10:25:04 +0000 (4 11:25 +0100)
committerGitHub <noreply@github.com>
Wed, 4 Dec 2024 10:25:04 +0000 (4 11:25 +0100)
treed7de8a87015456d30a38814eab559cb9f00b4733
parent78db4e9f7b93953e425b3b69636925a557bff7eb
[clang][bytecode] Handle bitcasts involving bitfields (#116843)

Copy the data one bit at a time, leaving optimizations for future work.
Adds a BitcastBuffer that takes care of pushing the bits in the right
order.
clang/lib/AST/ByteCode/BitcastBuffer.cpp [new file with mode: 0644]
clang/lib/AST/ByteCode/BitcastBuffer.h [new file with mode: 0644]
clang/lib/AST/ByteCode/Boolean.h
clang/lib/AST/ByteCode/Integral.h
clang/lib/AST/ByteCode/InterpBuiltinBitCast.cpp
clang/lib/AST/CMakeLists.txt
clang/test/AST/ByteCode/builtin-bit-cast-bitfields.cpp [new file with mode: 0644]
clang/test/AST/ByteCode/builtin-bit-cast.cpp
clang/unittests/AST/ByteCode/BitcastBuffer.cpp [new file with mode: 0644]
clang/unittests/AST/ByteCode/CMakeLists.txt