diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2017-05-01 17:07:49 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2017-05-01 17:07:49 +0000 |
commit | e6bca0eecbd31d9dd65040b212326330c9cf2655 (patch) | |
tree | 3c31531a3f71ae4353cecb5d65ba544283be0a39 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 2fa360483122f119070b272d93d858befc86cbf6 (diff) | |
download | llvm-e6bca0eecbd31d9dd65040b212326330c9cf2655.zip llvm-e6bca0eecbd31d9dd65040b212326330c9cf2655.tar.gz llvm-e6bca0eecbd31d9dd65040b212326330c9cf2655.tar.bz2 |
Rename WeakVH to WeakTrackingVH; NFC
This relands r301424.
llvm-svn: 301812
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 173b8cb..c6c9381 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -2226,10 +2226,11 @@ bool CodeGenPrepare::optimizeCallInst(CallInst *CI, bool& ModifiedDT) { ConstantInt *RetVal = lowerObjectSizeCall(II, *DL, TLInfo, /*MustSucceed=*/true); // Substituting this can cause recursive simplifications, which can - // invalidate our iterator. Use a WeakVH to hold onto it in case this + // invalidate our iterator. Use a WeakTrackingVH to hold onto it in case + // this // happens. Value *CurValue = &*CurInstIterator; - WeakVH IterHandle(CurValue); + WeakTrackingVH IterHandle(CurValue); replaceAndRecursivelySimplify(CI, RetVal, TLInfo, nullptr); @@ -4442,9 +4443,9 @@ bool CodeGenPrepare::optimizeMemoryInst(Instruction *MemoryInst, Value *Addr, // using it. if (Repl->use_empty()) { // This can cause recursive deletion, which can invalidate our iterator. - // Use a WeakVH to hold onto it in case this happens. + // Use a WeakTrackingVH to hold onto it in case this happens. Value *CurValue = &*CurInstIterator; - WeakVH IterHandle(CurValue); + WeakTrackingVH IterHandle(CurValue); BasicBlock *BB = CurInstIterator->getParent(); RecursivelyDeleteTriviallyDeadInstructions(Repl, TLInfo); |