================ @@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = { static_assert(std::size(BuiltinInfos) == NumBuiltins); llvm::SmallVector<Builtin::InfosShard> -SPIRVTargetInfo::getTargetBuiltins() const { - return {{&BuiltinStrings, BuiltinInfos}}; +BaseSPIRTargetInfo::getTargetBuiltins() const { + if (getTriple().isSPIRV()) + return {{&BuiltinStrings, BuiltinInfos}}; ---------------- Naghasan wrote:
> What if we had a BuiltinsSPIRVCore.td BuiltinsSPIRVVK.td and a > BuiltinsSPIRVCL.td I was looking into doing this. > You won't have an unknown builtin if we do it this way because we would never > expose the builtins that aren't valid for the target. You will if you use a VK one when targeting `spirv64` rather than a clear message. But it is nitpicking and I only have a weak preference on the matter. https://github.com/llvm/llvm-project/pull/137805 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits