summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Transforms/Scalar/ObjCARC.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/ObjCARC.cpp b/llvm/lib/Transforms/Scalar/ObjCARC.cpp
index e7c51780411..abd6b4185f6 100644
--- a/llvm/lib/Transforms/Scalar/ObjCARC.cpp
+++ b/llvm/lib/Transforms/Scalar/ObjCARC.cpp
@@ -662,10 +662,9 @@ static bool DoesObjCBlockEscape(const Value *BlockPtr) {
if (isa<BitCastInst>(UUser) || isa<GetElementPtrInst>(UUser) ||
isa<PHINode>(UUser) || isa<SelectInst>(UUser)) {
- if (!VisitedSet.count(UUser)) {
+ if (!VisitedSet.insert(UUser)) {
DEBUG(dbgs() << "DoesObjCBlockEscape: User copies value. Escapes "
"if result escapes. Adding to list.\n");
- VisitedSet.insert(V);
Worklist.push_back(UUser);
} else {
DEBUG(dbgs() << "DoesObjCBlockEscape: Already visited node.\n");
OpenPOWER on IntegriCloud