Skip to content

Commit 38e2b9e

Browse files
committed
Use SmallPtrSet instead of DenseSet as suggested by Anna.
Swift SVN r24854
1 parent 0562411 commit 38e2b9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SILPasses/DiagnoseUnreachable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ static bool diagnoseUnreachableBlock(const SILBasicBlock &B,
528528
const SILBasicBlockSet &Reachable,
529529
UnreachableUserCodeReportingState *State,
530530
const SILBasicBlock *TopLevelB,
531-
llvm::DenseSet<const SILBasicBlock*> &Visited){
531+
llvm::SmallPtrSetImpl<const SILBasicBlock*> &Visited){
532532
if (Visited.count(&B))
533533
return false;
534534
Visited.insert(&B);
@@ -647,7 +647,7 @@ static bool removeUnreachableBlocks(SILFunction &F, SILModule &M,
647647
BE = State->PossiblyUnreachableBlocks.end(); BI != BE; ++BI) {
648648
const SILBasicBlock *BB = *BI;
649649
if (!Reachable.count(BB)) {
650-
llvm::DenseSet<const SILBasicBlock *> visited;
650+
llvm::SmallPtrSet<const SILBasicBlock *, 1> visited;
651651
diagnoseUnreachableBlock(**BI, M, Reachable, State, BB, visited);
652652
}
653653
}

0 commit comments

Comments
 (0)