aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2024-04-12 14:10:07 -0700
committerGitHub <noreply@github.com>2024-04-12 14:10:07 -0700
commitc6cd4608c8c4a5356ae41ef05e67df3dc5d9500b (patch)
tree8f7011c3a4469dad543b309071ec726536de390e /llvm/lib/IR/Verifier.cpp
parent0f82469314f34a086669dfcd190a9f89260fbee5 (diff)
downloadllvm-c6cd4608c8c4a5356ae41ef05e67df3dc5d9500b.zip
llvm-c6cd4608c8c4a5356ae41ef05e67df3dc5d9500b.tar.gz
llvm-c6cd4608c8c4a5356ae41ef05e67df3dc5d9500b.tar.bz2
IRVerifier: Allow GlobalValue as llvm.threadlocal.address operand (#88321)
Loosen `llvm.threadlocal.address` verifier checks to allow any `GlobalValue` with `isThreadLocal()` set to true.
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 4092f0c..25cb99f 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -6226,10 +6226,10 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
}
case Intrinsic::threadlocal_address: {
const Value &Arg0 = *Call.getArgOperand(0);
- Check(isa<GlobalVariable>(Arg0),
- "llvm.threadlocal.address first argument must be a GlobalVariable");
- Check(cast<GlobalVariable>(Arg0).isThreadLocal(),
- "llvm.threadlocal.address operand isThreadLocal() must no be false");
+ Check(isa<GlobalValue>(Arg0),
+ "llvm.threadlocal.address first argument must be a GlobalValue");
+ Check(cast<GlobalValue>(Arg0).isThreadLocal(),
+ "llvm.threadlocal.address operand isThreadLocal() must be true");
break;
}
};