aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Pointer.cpp
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2025-07-10 15:05:28 +0200
committerGitHub <noreply@github.com>2025-07-10 15:05:28 +0200
commit130e6121f5bb1a54c591133d050aa1311ce16d7f (patch)
tree2ac1e9f32e06a3f98aaf6936896c9a47acacc247 /clang/lib/AST/ByteCode/Pointer.cpp
parent7bbb65c8fee605d7c875e495d7ce14f7700ce554 (diff)
downloadllvm-130e6121f5bb1a54c591133d050aa1311ce16d7f.zip
llvm-130e6121f5bb1a54c591133d050aa1311ce16d7f.tar.gz
llvm-130e6121f5bb1a54c591133d050aa1311ce16d7f.tar.bz2
[clang][bytecode][NFC] Move Pointer::StorageKind above the union (#147942)
This is easier to read in debuggers and more common.
Diffstat (limited to 'clang/lib/AST/ByteCode/Pointer.cpp')
-rw-r--r--clang/lib/AST/ByteCode/Pointer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp
index 6769e51..159b423 100644
--- a/clang/lib/AST/ByteCode/Pointer.cpp
+++ b/clang/lib/AST/ByteCode/Pointer.cpp
@@ -30,8 +30,8 @@ Pointer::Pointer(Block *Pointee, uint64_t BaseAndOffset)
: Pointer(Pointee, BaseAndOffset, BaseAndOffset) {}
Pointer::Pointer(const Pointer &P)
- : Offset(P.Offset), PointeeStorage(P.PointeeStorage),
- StorageKind(P.StorageKind) {
+ : Offset(P.Offset), StorageKind(P.StorageKind),
+ PointeeStorage(P.PointeeStorage) {
if (isBlockPointer() && PointeeStorage.BS.Pointee)
PointeeStorage.BS.Pointee->addPointer(this);
@@ -48,8 +48,8 @@ Pointer::Pointer(Block *Pointee, unsigned Base, uint64_t Offset)
}
Pointer::Pointer(Pointer &&P)
- : Offset(P.Offset), PointeeStorage(P.PointeeStorage),
- StorageKind(P.StorageKind) {
+ : Offset(P.Offset), StorageKind(P.StorageKind),
+ PointeeStorage(P.PointeeStorage) {
if (StorageKind == Storage::Block && PointeeStorage.BS.Pointee)
PointeeStorage.BS.Pointee->replacePointer(&P, this);