diff options
author | Martin Storsjö <martin@martin.st> | 2023-03-24 00:24:23 +0200 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2023-04-04 10:55:36 -0700 |
commit | b27338656d7db712ba6f37295b26f181ab2e043d (patch) | |
tree | f647b27f638aad779fdab42d0635df9de716ec02 | |
parent | b9857e6711a2d352a059d8b58a5d88b2ef16bb15 (diff) |
[llvm-rc] Fix the reference to the option for disabling preprocessing in a message
This was the original option name from the first iteration of the patch
that added the feature, but during review, a different name was suggested
and preferred - but the reference in the helpful message was missed.
Differential Revision: https://reviews.llvm.org/D146796
(cherry picked from commit 014e5c8d39c172a5b4bb1e1c75ced9bcb9ff2115)
-rw-r--r-- | llvm/tools/llvm-rc/llvm-rc.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/tools/llvm-rc/llvm-rc.cpp b/llvm/tools/llvm-rc/llvm-rc.cpp index 30c1569bc956..8864bbb4b0f3 100644 --- a/llvm/tools/llvm-rc/llvm-rc.cpp +++ b/llvm/tools/llvm-rc/llvm-rc.cpp @@ -218,6 +218,7 @@ struct RcOptions { std::string OutputFile; Format OutputFormat = Res; + bool IsWindres = false; bool BeVerbose = false; WriterParams Params; bool AppendNull = false; @@ -238,9 +239,12 @@ bool preprocess(StringRef Src, StringRef Dst, const RcOptions &Opts, } else { errs() << "llvm-rc: Unable to find clang, skipping preprocessing." << "\n"; - errs() << "Pass -no-cpp to disable preprocessing. This will be an error " - "in the future." - << "\n"; + StringRef OptionName = + Opts.IsWindres ? "--no-preprocess" : "-no-preprocess"; + errs() + << "Pass " << OptionName + << " to disable preprocessing. This will be an error in the future." + << "\n"; return false; } } @@ -365,6 +369,8 @@ RcOptions parseWindresOptions(ArrayRef<const char *> ArgsArr, unsigned MAI, MAC; opt::InputArgList InputArgs = T.ParseArgs(ArgsArr, MAI, MAC); + Opts.IsWindres = true; + // The tool prints nothing when invoked with no command-line arguments. if (InputArgs.hasArg(WINDRES_help)) { T.printHelp(outs(), "windres [options] file...", |