[clang] [clang][bytecode] Make Boolean::bitcastToMemory const (PR #215715)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 21:21:38 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/215715.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Boolean.h (+3-1)
``````````diff
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 {
``````````
</details>
https://github.com/llvm/llvm-project/pull/215715
More information about the cfe-commits
mailing list