[llvm] [PlaceSafepoints] Report usage error instead of asserting on invalid gc.safepoint_poll (PR #205520)
Gustas Rove via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 07:50:03 PDT 2026
================
@@ -629,10 +629,11 @@ InsertSafepointPoll(BasicBlock::iterator InsertBefore,
// path call - where we need to insert a safepoint (parsepoint).
auto *F = M->getFunction(GCSafepointPollName);
- assert(F && "gc.safepoint_poll function is missing");
+ if (!F)
+ reportFatalUsageError("gc.safepoint_poll function is missing");
assert(F->getFunctionType() ==
- FunctionType::get(Type::getVoidTy(M->getContext()), false) &&
- "gc.safepoint_poll declared with wrong type");
+ FunctionType::get(Type::getVoidTy(M->getContext()), false) &&
+ "gc.safepoint_poll declared with wrong type");
----------------
TheMixas wrote:
Fixed the indentation.
https://github.com/llvm/llvm-project/pull/205520
More information about the llvm-commits
mailing list