Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/flang
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-11-09 01:39:09 +0300
committerFangrui Song <i@maskray.me>2022-11-09 01:39:09 +0300
commit8c2c62282fca2f3dbfa338427aa97f702e67f86b (patch)
treefb6d4fbbec933cd0b8edd269096a83843315c69a /flang
parent1a2bc103bba04e8fba574c70c6201ba18ccc08ba (diff)
[Driver] Refactor err_drv_unsupported_option_argument call sites to use llvm::opt::Arg::getSpelling
For `-foo=bar`, getSpelling return `-foo=` which is exactly what we need from the diagnostic. Drop `-` from the err_drv_unsupported_option_argument template. This change makes `--` long option diagnostics more convenient. Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D137659
Diffstat (limited to 'flang')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index f2180145af71..043c35296bf3 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -688,7 +688,7 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc,
fpContractMode = LangOptions::FPM_Fast;
else {
diags.Report(clang::diag::err_drv_unsupported_option_argument)
- << a->getOption().getName() << val;
+ << a->getSpelling() << val;
return false;
}