Skip to content

Commit 2f9c9ff

Browse files
[llvm-extract] Avoid repeated hash lookups (NFC) (#109749)
1 parent 9a99e55 commit 2f9c9ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/tools/llvm-extract/llvm-extract.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,8 @@ int main(int argc, char **argv) {
297297
Function *CF = CB->getCalledFunction();
298298
if (!CF)
299299
continue;
300-
if (CF->isDeclaration() || GVs.count(CF))
300+
if (CF->isDeclaration() || !GVs.insert(CF))
301301
continue;
302-
GVs.insert(CF);
303302
Workqueue.push_back(CF);
304303
}
305304
}

0 commit comments

Comments
 (0)