Skip to content

Commit cfc035a

Browse files
authored
Attributor: Use use_empty instead of getNumUses == 0 (#136339)
1 parent e288670 commit cfc035a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: llvm/lib/Transforms/IPO/Attributor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3864,7 +3864,7 @@ static bool runAttributorOnFunctions(InformationCache &InfoCache,
38643864
unsigned FunSize = Functions.size();
38653865
for (unsigned u = 0; u < FunSize; u++) {
38663866
Function *F = Functions[u];
3867-
if (!F->isDeclaration() && !F->isDefinitionExact() && F->getNumUses() &&
3867+
if (!F->isDeclaration() && !F->isDefinitionExact() && !F->use_empty() &&
38683868
!GlobalValue::isInterposableLinkage(F->getLinkage())) {
38693869
Function *NewF = Attributor::internalizeFunction(*F);
38703870
assert(NewF && "Could not internalize function.");

0 commit comments

Comments
 (0)