[PATCH] D146796: [llvm-rc] Fix the reference to the option for disabling preprocessing in a message
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 03:28:16 PDT 2023
mstorsjo created this revision.
mstorsjo added reviewers: aganea, alvinhochun, thieta.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146796
Files:
llvm/tools/llvm-rc/llvm-rc.cpp
Index: llvm/tools/llvm-rc/llvm-rc.cpp
===================================================================
--- llvm/tools/llvm-rc/llvm-rc.cpp
+++ llvm/tools/llvm-rc/llvm-rc.cpp
@@ -219,6 +219,7 @@
std::string OutputFile;
Format OutputFormat = Res;
+ bool IsWindres = false;
bool BeVerbose = false;
WriterParams Params;
bool AppendNull = false;
@@ -239,9 +240,12 @@
} 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;
}
}
@@ -366,6 +370,8 @@
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...",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146796.508022.patch
Type: text/x-patch
Size: 1217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230324/3dcf0347/attachment.bin>
More information about the llvm-commits
mailing list