Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>, Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>, Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>, Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>, Timm =?utf-8?q?Bäder?= <tbae...@redhat.com>, Timm =?utf-8?q?Bäder?= <tbae...@redhat.com> Message-ID: In-Reply-To: <llvm/llvm-project/pull/68288/cl...@github.com>
================ @@ -66,6 +67,12 @@ class Boolean final { Boolean toUnsigned() const { return *this; } constexpr static unsigned bitWidth() { return 1; } + constexpr static unsigned objectReprBits() { return 8; } + constexpr static unsigned valueReprBytes(const ASTContext &Ctx) { return 1; } + constexpr static unsigned valueReprBits(const ASTContext &Ctx) { + return 8; + } // FIXME: Is this correct? ---------------- AaronBallman wrote: https://eel.is/c++draft/basic#fundamental-10 -- so it's implementation-defined how many bits are in the value representation; we default to 8 (https://github.com/llvm/llvm-project/blob/59750027b91000a56735d4f533225a3aeda996ce/clang/lib/Basic/TargetInfo.cpp#L72) and I didn't see any targets that use a different value. I think we may need to use `TargetInfo` for these at some point so we're matching the target when constant evaluating on the host. But I think that can happen later. https://github.com/llvm/llvm-project/pull/68288 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits