[clang] [NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (PR #66295)
Arthur Eubanks via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 14 09:34:44 PDT 2023
================
@@ -661,27 +661,27 @@ static bool FixupInvocation(CompilerInvocation &Invocation,
static unsigned getOptimizationLevel(ArgList &Args, InputKind IK,
DiagnosticsEngine &Diags) {
- unsigned DefaultOpt = llvm::CodeGenOpt::None;
+ unsigned DefaultOpt = 0;
if ((IK.getLanguage() == Language::OpenCL ||
IK.getLanguage() == Language::OpenCLCXX) &&
!Args.hasArg(OPT_cl_opt_disable))
- DefaultOpt = llvm::CodeGenOpt::Default;
+ DefaultOpt = 2;
----------------
aeubanks wrote:
`llvm::CodeGenOpt` is for LLVM's codegen pipeline, but here it's getting overloaded to be used in clang's IR codegen. These are two different concepts where the defaults happen to have the same value.
https://github.com/llvm/llvm-project/pull/66295
More information about the cfe-commits
mailing list