From 0a1aa6cda2758b0926a95f87d39ffefb1cb90200 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Thu, 14 Sep 2023 14:10:14 -0700 Subject: [NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295) This will make it easy for callers to see issues with and fix up calls to createTargetMachine after a future change to the params of TargetMachine. This matches other nearby enums. For downstream users, this should be a fairly straightforward replacement, e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive or s/CGFT_/CodeGenFileType:: --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index c43ca25..b25a38b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -1537,8 +1537,8 @@ void CodeViewDebug::beginFunctionImpl(const MachineFunction *MF) { } FPO |= FrameProcedureOptions(uint32_t(CurFn->EncodedLocalFramePtrReg) << 14U); FPO |= FrameProcedureOptions(uint32_t(CurFn->EncodedParamFramePtrReg) << 16U); - if (Asm->TM.getOptLevel() != CodeGenOpt::None && - !GV.hasOptSize() && !GV.hasOptNone()) + if (Asm->TM.getOptLevel() != CodeGenOptLevel::None && !GV.hasOptSize() && + !GV.hasOptNone()) FPO |= FrameProcedureOptions::OptimizedForSpeed; if (GV.hasProfileData()) { FPO |= FrameProcedureOptions::ValidProfileCounts; -- cgit v1.1