Add a new WeakVH value handle; NFC
This relands r301425.
llvm-svn: 301813
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index bde5b3a..02b40c9 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -820,8 +820,10 @@
switch (Entry->getKind()) {
case Assert:
break;
+ case Weak:
case WeakTracking:
- // WeakTracking just goes to null, which will unlink it from the list.
+ // WeakTracking and Weak just go to null, which unlinks them
+ // from the list.
Entry->operator=(nullptr);
break;
case Callback:
@@ -869,7 +871,8 @@
switch (Entry->getKind()) {
case Assert:
- // Asserting handle does not follow RAUW implicitly.
+ case Weak:
+ // Asserting and Weak handles do not follow RAUW implicitly.
break;
case WeakTracking:
// Weak goes to the new value, which will unlink it from Old's list.