2 Commits

Author SHA1 Message Date
Timm Baeder
88823d08ab
[clang][bytecode][NFC] Switch BitcastBuffer to SmallVector (#114677)
This is a little easier to work with since we are guaranteed that the
item type of the vector is byte sized and not something else.
2024-11-03 11:16:59 +01:00
Timm Baeder
ef2a104c94
[clang][bytecode] Start implementing __builtin_bit_cast (#112126)
This is a subset of #68288, with hopefully narrower scope. It does not
support bitcasting to non-integral types yet.
Bitfields are supported, but only if they result in a full byte-sized
final buffer. It does not support casting from null-pointers yet or
casting from indeterminate bits.


The tests are from #68288 and partially from #74775.

The `BitcastBuffer` struct is currently always working in single bits,
but I plan to (try to) optimize this for the common full-byte case.
2024-10-31 18:09:40 +01:00