[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 20 06:38:39 PST 2024
================
@@ -295,62 +218,56 @@ static bool CheckBitcastType(InterpState &S, CodePtr OpPC, QualType T,
static bool readPointerToBuffer(const Context &Ctx, const Pointer &FromPtr,
BitcastBuffer &Buffer, bool ReturnOnUninit) {
const ASTContext &ASTCtx = Ctx.getASTContext();
- bool SwapData = (ASTCtx.getTargetInfo().isLittleEndian() !=
- llvm::sys::IsLittleEndianHost);
- bool BigEndianTarget = ASTCtx.getTargetInfo().isBigEndian();
+ Endian TargetEndianness =
+ ASTCtx.getTargetInfo().isLittleEndian() ? Endian::Little : Endian::Big;
return enumeratePointerFields(
FromPtr, Ctx,
[&](const Pointer &P, PrimType T, size_t BitOffset,
bool PackedBools) -> bool {
- if (!P.isInitialized()) {
- assert(false && "Implement uninitialized value tracking");
- return ReturnOnUninit;
- }
+ // if (!P.isInitialized()) {
----------------
AaronBallman wrote:
Dead code?
https://github.com/llvm/llvm-project/pull/116843
More information about the cfe-commits
mailing list