We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54b6c2e commit cca9ef5Copy full SHA for cca9ef5
include/swift/Basic/ImmutablePointerSet.h
@@ -252,6 +252,12 @@ template <typename T> class ImmutablePointerSetFactory {
252
if (S2->empty())
253
return S1;
254
255
+ // We know that all of our PtrSets are uniqued. So if S1 and S2 are the same
256
+ // set, their pointers must also be the same set. In such a case, we return
257
+ // early returning S1 without any loss of generality.
258
+ if (S1 == S2)
259
+ return S1;
260
+
261
llvm::FoldingSetNodeID ID;
262
263
// We know that both of our pointer sets are sorted, so we can essentially
0 commit comments