[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 24 03:04:32 PST 2023
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/68288 at 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?
----------------
cor3ntin wrote:
`Ctx.getTargetInfo().getBoolWidth()` should do the trick
https://github.com/llvm/llvm-project/pull/68288
More information about the cfe-commits
mailing list