aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorTom Eccles <tom.eccles@arm.com>2022-10-18 16:14:52 +0000
committerTom Eccles <tom.eccles@arm.com>2022-11-04 17:22:34 +0000
commit36b37a1ed561404a32a4b4b6e2bd92d915894a7c (patch)
tree2709db6a63feebff3d9616deae7b0226861e959e /flang/lib/Frontend/CompilerInvocation.cpp
parentb5e93e390c06602cb03121ad875e2855253e2937 (diff)
downloadllvm-36b37a1ed561404a32a4b4b6e2bd92d915894a7c.zip
llvm-36b37a1ed561404a32a4b4b6e2bd92d915894a7c.tar.gz
llvm-36b37a1ed561404a32a4b4b6e2bd92d915894a7c.tar.bz2
[flang] Add -f[no-]approx-func
Only add the option processing and store the result. No attributes are added to FIR yet. Differential Revision: https://reviews.llvm.org/D137326
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 cce97ca..dd461c7 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -708,6 +708,12 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc,
opts.NoHonorNaNs = true;
}
+ if (const llvm::opt::Arg *a =
+ args.getLastArg(clang::driver::options::OPT_fapprox_func)) {
+ diags.Report(diagUnimplemented) << a->getOption().getName();
+ opts.ApproxFunc = true;
+ }
+
return true;
}