From cdbe956ec386b3ffa6c8d03c2bea178394d09095 Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Thu, 4 Aug 2022 11:31:01 -0400 Subject: [PATCH] RustWrapper: update for TypedPointerType in LLVM This is a result of https://reviews.llvm.org/D130592. --- compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index c333738ded458..5f5b5de790e43 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -1311,10 +1311,15 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) { return LLVMBFloatTypeKind; case Type::X86_AMXTyID: return LLVMX86_AMXTypeKind; -#if LLVM_VERSION_GE(15, 0) +#if LLVM_VERSION_GE(15, 0) && LLVM_VERSION_LT(16, 0) case Type::DXILPointerTyID: report_fatal_error("Rust does not support DirectX typed pointers."); break; +#endif +#if LLVM_VERSION_GE(16, 0) + case Type::TypedPointerTyID: + report_fatal_error("Rust does not support typed pointers."); + break; #endif } report_fatal_error("Unhandled TypeID.");