summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r--llvm/lib/IR/Value.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index 18e44dcd352..d83bdf2acd4 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -826,9 +826,7 @@ void ValueHandleBase::ValueIsDeleted(Value *V) {
Entry->operator=(DenseMapInfo<Value *>::getTombstoneKey());
break;
case Weak:
- case WeakTracking:
- // WeakTracking and Weak just go to null, which unlinks them
- // from the list.
+ // Weak just goes to null, which will unlink it from the list.
Entry->operator=(nullptr);
break;
case Callback:
@@ -876,20 +874,17 @@ void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) {
switch (Entry->getKind()) {
case Assert:
- case Weak:
- // Asserting and Weak handles do not follow RAUW implicitly.
+ // Asserting handle does not follow RAUW implicitly.
break;
case Tracking:
- // Tracking goes to new value like a WeakTrackingVH. Note that this may
- // make it something incompatible with its templated type. We don't want
- // to have a virtual (or inline) interface to handle this though, so
- // instead we make the TrackingVH accessors guarantee that a client never
- // sees this value.
+ // Tracking goes to new value like a WeakVH. Note that this may make it
+ // something incompatible with its templated type. We don't want to have a
+ // virtual (or inline) interface to handle this though, so instead we make
+ // the TrackingVH accessors guarantee that a client never sees this value.
LLVM_FALLTHROUGH;
- case WeakTracking:
- // WeakTracking goes to the new value, which will unlink it from Old's
- // list.
+ case Weak:
+ // Weak goes to the new value, which will unlink it from Old's list.
Entry->operator=(New);
break;
case Callback:
@@ -906,7 +901,7 @@ void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) {
for (Entry = pImpl->ValueHandles[Old]; Entry; Entry = Entry->Next)
switch (Entry->getKind()) {
case Tracking:
- case WeakTracking:
+ case Weak:
dbgs() << "After RAUW from " << *Old->getType() << " %"
<< Old->getName() << " to " << *New->getType() << " %"
<< New->getName() << "\n";
OpenPOWER on IntegriCloud