From b5e93e390c06602cb03121ad875e2855253e2937 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Mon, 17 Oct 2022 17:45:15 +0000 Subject: [flang] Add -f[no-]honor-nans and -menable-no-nans Only add the option processing and store the result. No attributes are added to FIR yet. Differential Revision: https://reviews.llvm.org/D137325 --- flang/lib/Frontend/CompilerInvocation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'flang/lib/Frontend/CompilerInvocation.cpp') diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 252e1a7..cce97ca 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -702,6 +702,12 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc, opts.NoHonorInfs = true; } + if (const llvm::opt::Arg *a = + args.getLastArg(clang::driver::options::OPT_menable_no_nans)) { + diags.Report(diagUnimplemented) << a->getOption().getName(); + opts.NoHonorNaNs = true; + } + return true; } -- cgit v1.1