aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 98a8714..0297317 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -306,8 +306,11 @@ static bool parseFrontendArgs(FrontendOptions &opts, llvm::opt::ArgList &args,
case clang::driver::options::OPT_fsyntax_only:
opts.programAction = ParseSyntaxOnly;
break;
- case clang::driver::options::OPT_emit_mlir:
- opts.programAction = EmitMLIR;
+ case clang::driver::options::OPT_emit_fir:
+ opts.programAction = EmitFIR;
+ break;
+ case clang::driver::options::OPT_emit_hlfir:
+ opts.programAction = EmitHLFIR;
break;
case clang::driver::options::OPT_emit_llvm:
opts.programAction = EmitLLVM;
@@ -911,7 +914,8 @@ bool CompilerInvocation::createFromArgs(
}
// -flang-experimental-hlfir
- if (args.hasArg(clang::driver::options::OPT_flang_experimental_hlfir)) {
+ if (args.hasArg(clang::driver::options::OPT_flang_experimental_hlfir) ||
+ args.hasArg(clang::driver::options::OPT_emit_hlfir)) {
res.loweringOpts.setLowerToHighLevelFIR(true);
}