about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-04 22:25:06 +0200
committerGitHub <noreply@github.com>2022-08-04 22:25:06 +0200
commitc2d7321a2dc898bc23c37a9322c5318c767c35db (patch)
treea3af49ccf1294aaed6508bbb1b9d57b4c0aaa722
parent60d83e732ba847057a7b4d575b98f6581f84e34c (diff)
parentcdbe956ec386b3ffa6c8d03c2bea178394d09095 (diff)
downloadrust-c2d7321a2dc898bc23c37a9322c5318c767c35db.tar.gz
rust-c2d7321a2dc898bc23c37a9322c5318c767c35db.zip
Rollup merge of #100148 - durin42:llvm-16-pointertype, r=nikic
RustWrapper: update for TypedPointerType in LLVM

This is a result of https://reviews.llvm.org/D130592.

r? `@nikic`
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index c333738ded4..5f5b5de790e 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -1311,11 +1311,16 @@ 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.");
 }