Add a new WeakVH value handle; NFC
This PR pulls 2 upstream changes, Add a new WeakVH value handle; NFC (https://github.com/llvm/llvm-project/commit/f1c0eafd5b10d33d957457ef292c56e6bab17938) and Use a 2 bit pointer in ValueHandleBase::PrevPair; NFC (https://github.com/llvm/llvm-project/commit/b297bff1cc974023a49d6ad898badf78a08692c3), into DXC.
Here's the summary of the changes:
Add a new WeakVH value handle; NFC
WeakVH nulls itself out if the value it was tracking gets deleted, but it does not track RAUW. Reviewers: dblaikie, davide Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D32267
Use a 2 bit pointer in ValueHandleBase::PrevPair; NFC
This was an omission in r301813. I had made the supporting changes to make this happen, but I forgot to actually update the
PrevPair declaration.
This is part 4 and 5 of the fix for #6659.
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
You can test this locally with the following command:
git-clang-format --diff e13c18bb4df451c30450929f6b8418cbcc592e46 2afad672de19b6f67b5b91779ad60d02c2473a47 -- include/llvm/IR/ValueHandle.h lib/IR/Value.cpp unittests/IR/ValueHandleTest.cpp
View the diff from clang-format here.
diff --git a/unittests/IR/ValueHandleTest.cpp b/unittests/IR/ValueHandleTest.cpp
index c38f80fe..5cdad74b 100644
--- a/unittests/IR/ValueHandleTest.cpp
+++ b/unittests/IR/ValueHandleTest.cpp
@@ -118,7 +118,6 @@ TEST_F(ValueHandle, WeakTrackingVH_NullOnDeletion) {
EXPECT_EQ(null_value, WVH_Recreated);
}
-
TEST_F(ValueHandle, AssertingVH_BasicOperation) {
AssertingVH<CastInst> AVH(BitcastV.get());
CastInst *implicit_to_exact_type = AVH;
- [x] Check this box to apply formatting changes to this branch.