about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorAugie Fackler <augie@google.com>2022-08-04 11:31:01 -0400
committerAugie Fackler <augie@google.com>2022-08-04 11:31:57 -0400
commitcdbe956ec386b3ffa6c8d03c2bea178394d09095 (patch)
treed00122edb92921e6c29eac9f3d0d6f8d0018da87 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent6f18f0a9d4548bc87afff1e4c0fe9081c35002c2 (diff)
downloadrust-cdbe956ec386b3ffa6c8d03c2bea178394d09095.tar.gz
rust-cdbe956ec386b3ffa6c8d03c2bea178394d09095.zip
RustWrapper: update for TypedPointerType in LLVM
This is a result of https://reviews.llvm.org/D130592.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-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.");
 }