diff options
| author | bors <bors@rust-lang.org> | 2024-09-21 07:44:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-21 07:44:18 +0000 |
| commit | a3fea24971e748914354acaf90033bbe594a4fa5 (patch) | |
| tree | 2b38cc25ccc76b8bbb92155efbff283d54e33477 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 3d4d5e1c107b9a90f43426a009904e0a896b2db0 (diff) | |
| parent | 7d9a4a7d3a4ae6298f3aed697dffaaf379308983 (diff) | |
| download | rust-a3fea24971e748914354acaf90033bbe594a4fa5.tar.gz rust-a3fea24971e748914354acaf90033bbe594a4fa5.zip | |
Auto merge of #3901 - RalfJung:rustup, r=RalfJung
Rustup This has a larger large "fmt" diff, probably there was a bug rustfmt update. For some reason the automatic `./miri fmt` on CI failed so this PR had to be created by hand -- it is unclear to me why this occurred.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index ed12318c88d..f9fc2bd6da3 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -310,16 +310,10 @@ static Attribute::AttrKind fromRust(LLVMRustAttribute Kind) { return Attribute::SafeStack; case FnRetThunkExtern: return Attribute::FnRetThunkExtern; -#if LLVM_VERSION_GE(18, 0) case Writable: return Attribute::Writable; case DeadOnUnwind: return Attribute::DeadOnUnwind; -#else - case Writable: - case DeadOnUnwind: - report_fatal_error("Not supported on this LLVM version"); -#endif } report_fatal_error("bad AttributeKind"); } @@ -1061,11 +1055,7 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticMemberType( return wrap(Builder->createStaticMemberType( unwrapDI<DIDescriptor>(Scope), StringRef(Name, NameLen), unwrapDI<DIFile>(File), LineNo, unwrapDI<DIType>(Ty), fromRust(Flags), - unwrap<llvm::ConstantInt>(val), -#if LLVM_VERSION_GE(18, 0) - llvm::dwarf::DW_TAG_member, -#endif - AlignInBits)); + unwrap<llvm::ConstantInt>(val), llvm::dwarf::DW_TAG_member, AlignInBits)); } extern "C" LLVMMetadataRef @@ -1182,10 +1172,7 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateEnumerationType( unwrapDI<DIDescriptor>(Scope), StringRef(Name, NameLen), unwrapDI<DIFile>(File), LineNumber, SizeInBits, AlignInBits, DINodeArray(unwrapDI<MDTuple>(Elements)), unwrapDI<DIType>(ClassTy), -#if LLVM_VERSION_GE(18, 0) - /* RunTimeLang */ 0, -#endif - "", IsScoped)); + /* RunTimeLang */ 0, "", IsScoped)); } extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateUnionType( @@ -1552,27 +1539,19 @@ LLVMRustGetInstrProfIncrementIntrinsic(LLVMModuleRef M) { extern "C" LLVMValueRef LLVMRustGetInstrProfMCDCParametersIntrinsic(LLVMModuleRef M) { -#if LLVM_VERSION_GE(18, 0) return wrap(llvm::Intrinsic::getDeclaration( unwrap(M), llvm::Intrinsic::instrprof_mcdc_parameters)); -#else - report_fatal_error("LLVM 18.0 is required for mcdc intrinsic functions"); -#endif } extern "C" LLVMValueRef LLVMRustGetInstrProfMCDCTVBitmapUpdateIntrinsic(LLVMModuleRef M) { -#if LLVM_VERSION_GE(18, 0) return wrap(llvm::Intrinsic::getDeclaration( unwrap(M), llvm::Intrinsic::instrprof_mcdc_tvbitmap_update)); -#else - report_fatal_error("LLVM 18.0 is required for mcdc intrinsic functions"); -#endif } extern "C" LLVMValueRef LLVMRustGetInstrProfMCDCCondBitmapIntrinsic(LLVMModuleRef M) { -#if LLVM_VERSION_GE(18, 0) && LLVM_VERSION_LT(19, 0) +#if LLVM_VERSION_LT(19, 0) return wrap(llvm::Intrinsic::getDeclaration( unwrap(M), llvm::Intrinsic::instrprof_mcdc_condbitmap_update)); #else |
