[clang] [clang][bytecode][NFC] Move Pointer::StorageKind above the union (PR #147942)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 10 04:54:15 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
This is easier to read in debuggers and more common.
---
Full diff: https://github.com/llvm/llvm-project/pull/147942.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Pointer.h (+1-1)
``````````diff
diff --git a/clang/lib/AST/ByteCode/Pointer.h b/clang/lib/AST/ByteCode/Pointer.h
index d525f84fd6605..e6a64e6658f06 100644
--- a/clang/lib/AST/ByteCode/Pointer.h
+++ b/clang/lib/AST/ByteCode/Pointer.h
@@ -809,13 +809,13 @@ class Pointer {
/// Next link in the pointer chain.
Pointer *Next = nullptr;
+ Storage StorageKind = Storage::Int;
union {
BlockPointer BS;
IntPointer Int;
FunctionPointer Fn;
TypeidPointer Typeid;
} PointeeStorage;
- Storage StorageKind = Storage::Int;
};
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Pointer &P) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/147942
More information about the cfe-commits
mailing list