aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorTom Eccles <tom.eccles@arm.com>2022-10-17 17:16:24 +0000
committerTom Eccles <tom.eccles@arm.com>2022-11-03 10:38:09 +0000
commit0fb763e7d0a4b8c9f5978675e7556ae50716d695 (patch)
tree363d8cf6b2479960f5b662765b5aa5203a1ac1bd /flang/lib/Frontend/CompilerInvocation.cpp
parent5945ab10c36a908e3cb540f80a7c97dcaf19ec5b (diff)
downloadllvm-0fb763e7d0a4b8c9f5978675e7556ae50716d695.zip
llvm-0fb763e7d0a4b8c9f5978675e7556ae50716d695.tar.gz
llvm-0fb763e7d0a4b8c9f5978675e7556ae50716d695.tar.bz2
[flang] Add -f[no-]honor-infinities and -menable-no-infs
Only add the option processing and store the result. No attributes are added to FIR yet. This patch follows Clang in forwarding -fno-honor-infinities as -menable-no-infs. Reviewed By: kiranchandramohan awarzynski vzakhari Differential Revision: https://reviews.llvm.org/D137072
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 3a64086..10c7316 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -691,6 +691,12 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc,
opts.setFPContractMode(fpContractMode);
}
+ if (const llvm::opt::Arg *a =
+ args.getLastArg(clang::driver::options::OPT_menable_no_infinities)) {
+ diags.Report(diagUnimplemented) << a->getOption().getName();
+ opts.NoHonorInfs = true;
+ }
+
return true;
}