diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 14757b27a3758..b07a0c77b1dab 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -1419,8 +1419,10 @@ extern "C" LLVMTypeKind LLVMRustGetTypeKind(LLVMTypeRef Ty) { return LLVMPointerTypeKind; case Type::FixedVectorTyID: return LLVMVectorTypeKind; +#if LLVM_VERSION_LT(20, 0) case Type::X86_MMXTyID: return LLVMX86_MMXTypeKind; +#endif case Type::TokenTyID: return LLVMTokenTypeKind; case Type::ScalableVectorTyID: