Changed SmallPtrSet.count guard + SmallPtrSet.insert to just SmallPtrSet.insert.

llvm-svn: 172452
This commit is contained in:
Michael Gottesman 2013-01-14 19:18:39 +00:00
parent 0a8fbdd015
commit e9145d3846
1 changed files with 1 additions and 2 deletions

View File

@ -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");