Skip to content

Commit 052ca60

Browse files
committed
PassWrapper: adapt for llvm/llvm-project@b01e2a8
A boolean turned into an enum. None matches the old behavior of false, so we pass that. @rustbot label: +llvm-main
1 parent a0d98ff commit 052ca60

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -827,9 +827,14 @@ extern "C" LLVMRustResult LLVMRustOptimize(
827827
!NoPrepopulatePasses) {
828828
PipelineStartEPCallbacks.push_back(
829829
[](ModulePassManager &MPM, OptimizationLevel Level) {
830-
MPM.addPass(LowerTypeTestsPass(/*ExportSummary=*/nullptr,
831-
/*ImportSummary=*/nullptr,
832-
/*DropTypeTests=*/false));
830+
MPM.addPass(LowerTypeTestsPass(
831+
/*ExportSummary=*/nullptr,
832+
/*ImportSummary=*/nullptr,
833+
#if LLVM_VERSION_GE(20, 0)
834+
/*DropTypeTests=*/llvm::lowertypetests::DropTestKind::None));
835+
#else
836+
/*DropTypeTests=*/false));
837+
#endif
833838
});
834839
}
835840

0 commit comments

Comments
 (0)