mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
llvm-wrapper: adapt for LLVM API change
No functional changes intended.
The LLVM commit e6b02214c6
added `TargetExtTyID` to the `TypeID` enum. This adapts `RustWrapper` accordingly.
This commit is contained in:
parent
4f4d0586ad
commit
799fa60c07
@ -1349,18 +1349,16 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) {
|
||||
return LLVMBFloatTypeKind;
|
||||
case Type::X86_AMXTyID:
|
||||
return LLVMX86_AMXTypeKind;
|
||||
#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
|
||||
default:
|
||||
{
|
||||
std::string error;
|
||||
llvm::raw_string_ostream stream(error);
|
||||
stream << "Rust does not support the TypeID: " << unwrap(Ty)->getTypeID()
|
||||
<< " for the type: " << *unwrap(Ty);
|
||||
stream.flush();
|
||||
report_fatal_error(error.c_str());
|
||||
}
|
||||
}
|
||||
report_fatal_error("Unhandled TypeID.");
|
||||
}
|
||||
|
||||
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(SMDiagnostic, LLVMSMDiagnosticRef)
|
||||
|
Loading…
Reference in New Issue
Block a user