[llvm] [IR] Check parameters of target extension types on construction (PR #107268)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 02:54:18 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));
----------------
nikic wrote:
I think it's ok as it only happens the first time the type is created, so the cost is probably negligible.
https://github.com/llvm/llvm-project/pull/107268
More information about the llvm-commits
mailing list