Skip to content

Commit

Permalink
PassWrapper: adapt for llvm/llvm-project@b01e2a8
Browse files Browse the repository at this point in the history
A boolean turned into an enum. None matches the old behavior of false,
so we pass that.

@rustbot label: +llvm-main
  • Loading branch information
durin42 committed Oct 31, 2024
1 parent a0d98ff commit 052ca60
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -827,9 +827,14 @@ extern "C" LLVMRustResult LLVMRustOptimize(
!NoPrepopulatePasses) {
PipelineStartEPCallbacks.push_back(
[](ModulePassManager &MPM, OptimizationLevel Level) {
MPM.addPass(LowerTypeTestsPass(/*ExportSummary=*/nullptr,
/*ImportSummary=*/nullptr,
/*DropTypeTests=*/false));
MPM.addPass(LowerTypeTestsPass(
/*ExportSummary=*/nullptr,
/*ImportSummary=*/nullptr,
#if LLVM_VERSION_GE(20, 0)
/*DropTypeTests=*/llvm::lowertypetests::DropTestKind::None));
#else
/*DropTypeTests=*/false));
#endif
});
}

Expand Down

0 comments on commit 052ca60

Please sign in to comment.