aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2023-09-14 14:10:14 -0700
committerGitHub <noreply@github.com>2023-09-14 14:10:14 -0700
commit0a1aa6cda2758b0926a95f87d39ffefb1cb90200 (patch)
tree766dc35b70235864f287a9f0a2cef45d487203ad /flang/lib/Frontend/CompilerInvocation.cpp
parentae84b160d2fe61a7211817262ce717a17d27c0ae (diff)
downloadllvm-0a1aa6cda2758b0926a95f87d39ffefb1cb90200.zip
llvm-0a1aa6cda2758b0926a95f87d39ffefb1cb90200.tar.gz
llvm-0a1aa6cda2758b0926a95f87d39ffefb1cb90200.tar.bz2
[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::
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index dba2ac1..6c0b90c 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -98,12 +98,12 @@ static bool parseShowColorsArgs(const llvm::opt::ArgList &args,
/// Extracts the optimisation level from \a args.
static unsigned getOptimizationLevel(llvm::opt::ArgList &args,
clang::DiagnosticsEngine &diags) {
- unsigned defaultOpt = llvm::CodeGenOpt::None;
+ unsigned defaultOpt = 0;
if (llvm::opt::Arg *a =
args.getLastArg(clang::driver::options::OPT_O_Group)) {
if (a->getOption().matches(clang::driver::options::OPT_O0))
- return llvm::CodeGenOpt::None;
+ return 0;
assert(a->getOption().matches(clang::driver::options::OPT_O));