Skip to content

Commit 34f3466

Browse files
authored
LowerGlobalDtors: Use use_empty instead of getNumUses == 0 (#136337)
1 parent cfc035a commit 34f3466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Utils/LowerGlobalDtors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static bool runImpl(Module &M) {
146146
// the program never exits) we can simply return early and clear out
147147
// @llvm.global_dtors.
148148
if (auto F = dyn_cast<Function>(AtExit.getCallee())) {
149-
if (F && F->hasExactDefinition() && F->getArg(0)->getNumUses() == 0) {
149+
if (F && F->hasExactDefinition() && F->getArg(0)->use_empty()) {
150150
GV->eraseFromParent();
151151
return true;
152152
}

0 commit comments

Comments
 (0)