aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-01-14 19:18:39 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-01-14 19:18:39 +0000
commitf3c1335c596e2a45a877e39a139b23ea5481eb37 (patch)
treec79f71c88d1cef9fadfd84b7258811bffd1dc160 /lib/Transforms
parent318cad33231f765f9b6b2af4bb43f8c281b99d19 (diff)
Changed SmallPtrSet.count guard + SmallPtrSet.insert to just SmallPtrSet.insert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/ObjCARC.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp
index e7c5178041..abd6b4185f 100644
--- a/lib/Transforms/Scalar/ObjCARC.cpp
+++ b/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");