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/MachineFunction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index e1f9488..1f14546 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -1206,7 +1206,7 @@ bool MachineFunction::shouldUseDebugInstrRef() const { // have optimized code inlined into this unoptimized code, however with // fewer and less aggressive optimizations happening, coverage and accuracy // should not suffer. - if (getTarget().getOptLevel() == CodeGenOpt::None) + if (getTarget().getOptLevel() == CodeGenOptLevel::None) return false; // Don't use instr-ref if this function is marked optnone. -- cgit v1.1