[llvm] [IR] Check parameters of target extension types on construction (PR #107268)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 02:50:29 PDT 2024
================
@@ -792,28 +793,50 @@ TargetExtType::TargetExtType(LLVMContext &C, StringRef Name,
TargetExtType *TargetExtType::get(LLVMContext &C, StringRef Name,
ArrayRef<Type *> Types,
ArrayRef<unsigned> Ints) {
+ return cantFail(getOrError(C, Name, Types, Ints));
----------------
jayfoad wrote:
I think this will still call `checkParams` even in a Release build. It would be nice to avoid that, but to do that I think I would need to duplicate most of the body of `getOrError` here.
https://github.com/llvm/llvm-project/pull/107268
More information about the llvm-commits
mailing list