[llvm] OpenMPOpt: Avoid using getNumUses (PR #136349)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 13:43:08 PDT 2025


================
@@ -1535,7 +1535,7 @@ struct OpenMPOpt {
     // safely remove it.
     // TODO: This should be somewhere more common in the future.
     if (GlobalVariable *GV = M.getNamedGlobal("__llvm_rpc_client")) {
-      if (GV->getNumUses() >= 1)
+      if (GV->hasNUsesOrMore(1))
----------------
nikic wrote:

```suggestion
      if (!GV->use_empty())
```
Would be more typical?

https://github.com/llvm/llvm-project/pull/136349


More information about the llvm-commits mailing list