Skip to content

Commit a61b7da

Browse files
authored
Merge pull request #40698 from bnbarham/remove-unit-warning
[Frontend] Remove warning for missing `-index-store-path`
2 parents ac30d86 + 6e683ca commit a61b7da

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,6 @@ ERROR(error_index_failed_status_check,none,
236236
"failed file status check: %0", (StringRef))
237237
ERROR(error_index_inputs_more_than_outputs,none,
238238
"index output filenames do not match input source files", ())
239-
WARNING(warn_index_unit_output_path_without_index_store,none,
240-
"-index-unit-output-path is ignored without -index-store-path", ())
241239

242240
ERROR(error_wrong_number_of_arguments,none,
243241
"wrong number of '%0' arguments (expected %1, got %2)",

lib/Frontend/ArgsToFrontendOutputsConverter.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ bool ArgsToFrontendOutputsConverter::convert(
5050
Optional<std::vector<std::string>> indexMains;
5151
if (Args.hasArg(options::OPT_index_unit_output_path,
5252
options::OPT_index_unit_output_path_filelist)) {
53-
54-
if (!Args.hasArg(options::OPT_index_store_path)) {
55-
Diags.diagnose(SourceLoc(),
56-
diag::warn_index_unit_output_path_without_index_store);
57-
}
58-
5953
Optional<OutputFilesComputer> iuofc =
6054
OutputFilesComputer::create(Args, Diags, InputsAndOutputs, {
6155
"index unit output path", options::OPT_index_unit_output_path,

test/Index/Store/unit-custom-output-path.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,8 @@
239239
// RUN: -output-filelist %t/outputlist -index-unit-output-path-filelist %t/index-outputlist 2>&1 \
240240
// RUN: | %FileCheck --check-prefixes=ERROR_MISMATCH %s
241241
//
242-
// C) Check -index-unit-output-path without -index-store warns
243-
// RUN: %target-swift-frontend -typecheck -parse-stdlib \
242+
// C) Check -index-unit-output-path without -index-store-path does not cause a warning/error
243+
// RUN: %target-typecheck-verify-swift -parse-stdlib \
244244
// RUN: -module-name mod_name \
245245
// RUN: -primary-file %t/main.swift %t/second.swift \
246-
// RUN: -o %t/main_out.o -index-unit-output-path %t/custom_output.o 2>&1 \
247-
// RUN: | %FileCheck --check-prefixes=ERROR_IGNORED %s
248-
//
249-
// ERROR_IGNORED: warning: -index-unit-output-path is ignored without -index-store-path
250-
246+
// RUN: -o %t/main_out.o -index-unit-output-path %t/custom_output.o

0 commit comments

Comments
 (0)