Skip to content

Commit 73f0f46

Browse files
authored
Merge pull request #11375 from ahoppen/20240723/claim-index-compression
[Index] Mark `-index-store-compress` as used when `-index-store-path` is set
2 parents 7663e60 + a7b5471 commit 73f0f46

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ def index_ignore_pcms : Flag<["-"], "index-ignore-pcms">,
829829
Visibility<[ClangOption, CC1Option]>,
830830
HelpText<"Ignore symbols from imported pcm modules">,
831831
MarshallingInfoFlag<FrontendOpts<"IndexIgnorePcms">>;
832-
def index_store_record_compression
832+
def index_store_compress
833833
: Flag<["-"], "index-store-compress">,
834834
Visibility<[ClangOption, CC1Option]>,
835835
HelpText<"Whether to compress unit and record files in the index store">,

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6439,6 +6439,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &Job,
64396439
Args.AddLastArg(CmdArgs, options::OPT_index_unit_output_path);
64406440
Args.AddLastArg(CmdArgs, options::OPT_index_ignore_macros);
64416441
Args.AddLastArg(CmdArgs, options::OPT_index_ignore_pcms);
6442+
Args.AddLastArg(CmdArgs, options::OPT_index_store_compress);
64426443

64436444
// If '-o' is passed along with '-fsyntax-only' pass it along the cc1
64446445
// invocation so that the index action knows what the out file is.

clang/test/Index/Store/compress-index-store.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: rm -rf %t.idx
2-
// RUN: %clang_cc1 %s -index-store-path %t.idx -index-store-compress
2+
// RUN: %clang -Werror=unused-command-line-argument -fsyntax-only %s -index-store-path %t.idx -index-store-compress
33
// RUN: c-index-test core -print-unit %t.idx | FileCheck --check-prefix=UNIT %s
44
// RUN: c-index-test core -print-record %t.idx | FileCheck --check-prefix=RECORD %s
55

0 commit comments

Comments
 (0)