@@ -34,8 +34,8 @@ __pragma(warning(push))
3434#include " llvm/IR/PassManager.h"
3535#include " llvm/Passes/PassBuilder.h"
3636#include " llvm/Support/CommandLine.h"
37- #include " llvm/Support/Host.h"
3837#include " llvm/Support/TargetSelect.h"
38+ #include " llvm/TargetParser/Host.h"
3939#include " llvm/Transforms/InstCombine/InstCombine.h"
4040#include " llvm/Transforms/Instrumentation/MemorySanitizer.h"
4141#include " llvm/Transforms/Scalar/ADCE.h"
@@ -148,7 +148,7 @@ class JITGlobals
148148private:
149149 JITGlobals (llvm::orc::JITTargetMachineBuilder &&jitTargetMachineBuilder, llvm::DataLayout &&dataLayout);
150150
151- static llvm::CodeGenOpt::Level toLLVM (rr::Optimization::Level level);
151+ static llvm::CodeGenOptLevel toLLVM (rr::Optimization::Level level);
152152
153153 const llvm::orc::JITTargetMachineBuilder jitTargetMachineBuilder;
154154 const llvm::DataLayout dataLayout;
@@ -257,26 +257,26 @@ JITGlobals::JITGlobals(llvm::orc::JITTargetMachineBuilder &&jitTargetMachineBuil
257257{
258258}
259259
260- llvm::CodeGenOpt::Level JITGlobals::toLLVM (rr::Optimization::Level level)
260+ llvm::CodeGenOptLevel JITGlobals::toLLVM (rr::Optimization::Level level)
261261{
262262 // TODO(b/173257647): MemorySanitizer instrumentation produces IR which takes
263263 // a lot longer to process by the machine code optimization passes. Disabling
264264 // them has a negligible effect on code quality but compiles much faster.
265265 if (__has_feature (memory_sanitizer))
266266 {
267- return llvm::CodeGenOpt ::None;
267+ return llvm::CodeGenOptLevel ::None;
268268 }
269269
270270 switch (level)
271271 {
272- case rr::Optimization::Level::None: return llvm::CodeGenOpt ::None;
273- case rr::Optimization::Level::Less: return llvm::CodeGenOpt ::Less;
274- case rr::Optimization::Level::Default: return llvm::CodeGenOpt ::Default;
275- case rr::Optimization::Level::Aggressive: return llvm::CodeGenOpt ::Aggressive;
272+ case rr::Optimization::Level::None: return llvm::CodeGenOptLevel ::None;
273+ case rr::Optimization::Level::Less: return llvm::CodeGenOptLevel ::Less;
274+ case rr::Optimization::Level::Default: return llvm::CodeGenOptLevel ::Default;
275+ case rr::Optimization::Level::Aggressive: return llvm::CodeGenOptLevel ::Aggressive;
276276 default : UNREACHABLE (" Unknown Optimization Level %d" , int (level));
277277 }
278278
279- return llvm::CodeGenOpt ::Default;
279+ return llvm::CodeGenOptLevel ::Default;
280280}
281281
282282class MemoryMapper final : public llvm::SectionMemoryManager::MemoryMapper
0 commit comments