[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 21 07:58:13 PST 2024
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/116843 at github.com>
================
@@ -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()) {
----------------
tbaederr wrote:
See the last commit in https://github.com/llvm/llvm-project/pull/117179
https://github.com/llvm/llvm-project/pull/116843
More information about the cfe-commits
mailing list