Skip to content

Commit 014e5c8

Browse files
committed
[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
1 parent 282744a commit 014e5c8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

llvm/tools/llvm-rc/llvm-rc.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ struct RcOptions {
219219
std::string OutputFile;
220220
Format OutputFormat = Res;
221221

222+
bool IsWindres = false;
222223
bool BeVerbose = false;
223224
WriterParams Params;
224225
bool AppendNull = false;
@@ -239,9 +240,12 @@ bool preprocess(StringRef Src, StringRef Dst, const RcOptions &Opts,
239240
} else {
240241
errs() << "llvm-rc: Unable to find clang, skipping preprocessing."
241242
<< "\n";
242-
errs() << "Pass -no-cpp to disable preprocessing. This will be an error "
243-
"in the future."
244-
<< "\n";
243+
StringRef OptionName =
244+
Opts.IsWindres ? "--no-preprocess" : "-no-preprocess";
245+
errs()
246+
<< "Pass " << OptionName
247+
<< " to disable preprocessing. This will be an error in the future."
248+
<< "\n";
245249
return false;
246250
}
247251
}
@@ -366,6 +370,8 @@ RcOptions parseWindresOptions(ArrayRef<const char *> ArgsArr,
366370
unsigned MAI, MAC;
367371
opt::InputArgList InputArgs = T.ParseArgs(ArgsArr, MAI, MAC);
368372

373+
Opts.IsWindres = true;
374+
369375
// The tool prints nothing when invoked with no command-line arguments.
370376
if (InputArgs.hasArg(WINDRES_help)) {
371377
T.printHelp(outs(), "windres [options] file...",

0 commit comments

Comments
 (0)