Skip to content

Commit e8ae06a

Browse files
committed
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.
1 parent b2c2a32 commit e8ae06a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,11 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) {
12171217
return LLVMBFloatTypeKind;
12181218
case Type::X86_AMXTyID:
12191219
return LLVMX86_AMXTypeKind;
1220+
#if LLVM_VERSION_GE(15, 0)
1221+
case Type::DXILPointerTyID:
1222+
report_fatal_error("Rust does not support DirectX typed pointers.");
1223+
break;
1224+
#endif
12201225
}
12211226
report_fatal_error("Unhandled TypeID.");
12221227
}

0 commit comments

Comments
 (0)