Skip to content

Commit 761113a

Browse files
authored
[clang][driver] Add missing integrated tool option in error message, NFC (#81926)
1 parent 1d03d59 commit 761113a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clang/test/Driver/unknown-arg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
// SILENT-NOT: warning:
6060
// CC1AS-DID-YOU-MEAN: error: unknown argument '-hell'; did you mean '-help'?
6161
// CC1AS-DID-YOU-MEAN: error: unknown argument '--version'; did you mean '-version'?
62-
// UNKNOWN-INTEGRATED: error: unknown integrated tool '-cc1asphalt'. Valid tools include '-cc1' and '-cc1as'.
62+
// UNKNOWN-INTEGRATED: error: unknown integrated tool '-cc1asphalt'. Valid tools include '-cc1', '-cc1as' and '-cc1gen-reproducer'.
6363

6464
// RUN: %clang -S %s -o %t.s -Wunknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s
6565

clang/tools/driver/driver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,9 @@ static int ExecuteCC1Tool(SmallVectorImpl<const char *> &ArgV,
369369
return cc1gen_reproducer_main(ArrayRef(ArgV).slice(2), ArgV[0],
370370
GetExecutablePathVP, ToolContext);
371371
// Reject unknown tools.
372-
llvm::errs() << "error: unknown integrated tool '" << Tool << "'. "
373-
<< "Valid tools include '-cc1' and '-cc1as'.\n";
372+
llvm::errs()
373+
<< "error: unknown integrated tool '" << Tool << "'. "
374+
<< "Valid tools include '-cc1', '-cc1as' and '-cc1gen-reproducer'.\n";
374375
return 1;
375376
}
376377

0 commit comments

Comments
 (0)