Fix build with recent LLVM
MODIFY
tools/alive-tv.cpp
tools/alive-tv.cpp
@@ -250,9 +250,8 @@ void optimizeModule(llvm::Module *M) {
PB.registerLoopAnalyses(LAM);
PB.crossRegisterProxies(LAM, FAM, CGAM, MAM);
- llvm::FunctionPassManager FPM =
- PB.buildFunctionSimplificationPipeline(
- llvm::PassBuilder::OptimizationLevel::O2, llvm::ThinOrFullLTOPhase::None);
+ llvm::FunctionPassManager FPM = PB.buildFunctionSimplificationPipeline(
+ llvm::OptimizationLevel::O2, llvm::ThinOrFullLTOPhase::None);
llvm::ModulePassManager MPM;
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
MPM.run(*M, MAM);

MODIFY
tv/tv.cpp
tv/tv.cpp
@@ -520,8 +520,7 @@ llvmGetPassPluginInfo() {
// ClangTVFinalizePass internally checks whether we're running clang tv
// and finalizes resources then.
PB.registerOptimizerLastEPCallback(
- [](llvm::ModulePassManager &MPM,
- llvm::PassBuilder::OptimizationLevel) {
+ [](llvm::ModulePassManager &MPM, llvm::OptimizationLevel) {
MPM.addPass(ClangTVFinalizePass());
});
auto clang_tv = [](llvm::StringRef P, llvm::Any IR,

Fix build with recent LLVM (#734)