diff options
author | Timm Baeder <tbaeder@redhat.com> | 2025-07-30 10:17:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-30 10:17:21 +0200 |
commit | fb49c6784ad425a332bd528567b9c26624fff5b0 (patch) | |
tree | 9aaf9beb7e1cf71e314acef394e8a2621b9ea0ef /clang/lib/AST/ByteCode/Pointer.cpp | |
parent | e50bd78d54a228757de369a3951534244c6af36a (diff) | |
download | llvm-fb49c6784ad425a332bd528567b9c26624fff5b0.zip llvm-fb49c6784ad425a332bd528567b9c26624fff5b0.tar.gz llvm-fb49c6784ad425a332bd528567b9c26624fff5b0.tar.bz2 |
[clang][bytecode] Move Pointer::{Prev,Next} into BlockPointer (#151097)
They are only relevant for block pointers.
Diffstat (limited to 'clang/lib/AST/ByteCode/Pointer.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Pointer.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp index 4753a4e1..dec2088 100644 --- a/clang/lib/AST/ByteCode/Pointer.cpp +++ b/clang/lib/AST/ByteCode/Pointer.cpp @@ -42,7 +42,7 @@ Pointer::Pointer(Block *Pointee, unsigned Base, uint64_t Offset) : Offset(Offset), StorageKind(Storage::Block) { assert((Base == RootPtrMark || Base % alignof(void *) == 0) && "wrong base"); - PointeeStorage.BS = {Pointee, Base}; + PointeeStorage.BS = {Pointee, Base, nullptr, nullptr}; if (Pointee) Pointee->addPointer(this); @@ -89,7 +89,6 @@ Pointer &Pointer::operator=(const Pointer &P) { if (P.isBlockPointer()) { PointeeStorage.BS = P.PointeeStorage.BS; - PointeeStorage.BS.Pointee = P.PointeeStorage.BS.Pointee; if (PointeeStorage.BS.Pointee) PointeeStorage.BS.Pointee->addPointer(this); @@ -127,7 +126,6 @@ Pointer &Pointer::operator=(Pointer &&P) { if (P.isBlockPointer()) { PointeeStorage.BS = P.PointeeStorage.BS; - PointeeStorage.BS.Pointee = P.PointeeStorage.BS.Pointee; if (PointeeStorage.BS.Pointee) PointeeStorage.BS.Pointee->addPointer(this); |