Rollup merge of #96527 - durin42:llvm-15-werror-wswitch, r=nikic

RustWrapper: explicitly don't handle DXILPointerTyID

This new enum entry was introduced in https://reviews.llvm.org/D122268,
and if I'm reading correctly there's no case where we'd ever encounter
it in our uses of LLVM. To preserve the ability to compile this file
with -Werror -Wswitch we add an explicit case for this entry.

r? nikic
This commit is contained in:
Dylan DPC 2022-04-29 23:54:38 +02:00 committed by GitHub
commit 041f3b64dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1217,6 +1217,11 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) {
return LLVMBFloatTypeKind;
case Type::X86_AMXTyID:
return LLVMX86_AMXTypeKind;
#if LLVM_VERSION_GE(15, 0)
case Type::DXILPointerTyID:
report_fatal_error("Rust does not support DirectX typed pointers.");
break;
#endif
}
report_fatal_error("Unhandled TypeID.");
}