[clang] [clang][bytecode] Make Boolean::bitcastToMemory const (PR #215715)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 21:20:58 PDT 2026
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/215715
None
>From e17846c618cd4a849ed120cb283a22bf9755196f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Wed, 12 Aug 2026 06:19:54 +0200
Subject: [PATCH] [clang][bytecode] Make Boolean::bitcastToMemory const
---
clang/lib/AST/ByteCode/Boolean.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/clang/lib/AST/ByteCode/Boolean.h b/clang/lib/AST/ByteCode/Boolean.h
index 09eefee14a854..a4adcbc6ce008 100644
--- a/clang/lib/AST/ByteCode/Boolean.h
+++ b/clang/lib/AST/ByteCode/Boolean.h
@@ -80,7 +80,9 @@ class Boolean final {
return Boolean(Val);
}
- void bitcastToMemory(std::byte *Buff) { std::memcpy(Buff, &V, sizeof(V)); }
+ void bitcastToMemory(std::byte *Buff) const {
+ std::memcpy(Buff, &V, sizeof(V));
+ }
void print(llvm::raw_ostream &OS) const { OS << (V ? "true" : "false"); }
std::string toDiagnosticString(const ASTContext &Ctx) const {
More information about the cfe-commits
mailing list