[llvm] [IR] Reduce use of getCalledFunction in Verifier. NFCI. (PR #134978)
Tim Gymnich via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 02:00:39 PDT 2025
================
@@ -5804,11 +5797,8 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
// Are we tied to a statepoint properly?
const auto *StatepointCall = dyn_cast<CallBase>(Statepoint);
- const Function *StatepointFn =
- StatepointCall ? StatepointCall->getCalledFunction() : nullptr;
- Check(StatepointFn && StatepointFn->isDeclaration() &&
- StatepointFn->getIntrinsicID() ==
- Intrinsic::experimental_gc_statepoint,
+ Check(StatepointCall->getIntrinsicID() ==
+ Intrinsic::experimental_gc_statepoint,
----------------
tgymnich wrote:
```suggestion
Check(StatepointCall && StatepointCall->getIntrinsicID() ==
Intrinsic::experimental_gc_statepoint,
```
https://github.com/llvm/llvm-project/pull/134978
More information about the llvm-commits
mailing list