aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2025-09-29 09:14:33 +0200
committerGitHub <noreply@github.com>2025-09-29 09:14:33 +0200
commitfd8adf3ccf7dd388e60bced617731aa82b7c145a (patch)
treea7ba7236b6f01f249e7e5f64d6bea4a7706d7686 /llvm/lib/IR/Verifier.cpp
parent07778490e37946a60297b6446184b2bd2fa41030 (diff)
downloadllvm-fd8adf3ccf7dd388e60bced617731aa82b7c145a.zip
llvm-fd8adf3ccf7dd388e60bced617731aa82b7c145a.tar.gz
llvm-fd8adf3ccf7dd388e60bced617731aa82b7c145a.tar.bz2
[IR] Use immarg for preallocated intrinsics (NFC) (#155835)
Mark the attributes as immarg to indicate that they require a constant integer. This was previously enforced with a manual verifier check.
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index b2e76cc..8c03d6f 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -5869,9 +5869,7 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
break;
}
case Intrinsic::call_preallocated_setup: {
- auto *NumArgs = dyn_cast<ConstantInt>(Call.getArgOperand(0));
- Check(NumArgs != nullptr,
- "llvm.call.preallocated.setup argument must be a constant");
+ auto *NumArgs = cast<ConstantInt>(Call.getArgOperand(0));
bool FoundCall = false;
for (User *U : Call.users()) {
auto *UseCall = dyn_cast<CallBase>(U);