Skip to content

Commit 74cc2f4

Browse files
authored
Merge pull request #11376 from ahoppen/21.x/claim-index-compression
[Index] Mark `-index-store-compress` as used when `-index-store-path` is set
2 parents a7930a0 + a7aecbf commit 74cc2f4

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
@@ -737,7 +737,7 @@ def index_ignore_pcms : Flag<["-"], "index-ignore-pcms">,
737737
Visibility<[ClangOption, CC1Option]>,
738738
HelpText<"Ignore symbols from imported pcm modules">,
739739
MarshallingInfoFlag<FrontendOpts<"IndexIgnorePcms">>;
740-
def index_store_record_compression
740+
def index_store_compress
741741
: Flag<["-"], "index-store-compress">,
742742
Visibility<[ClangOption, CC1Option]>,
743743
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
@@ -6477,6 +6477,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &Job,
64776477
Args.AddLastArg(CmdArgs, options::OPT_index_unit_output_path);
64786478
Args.AddLastArg(CmdArgs, options::OPT_index_ignore_macros);
64796479
Args.AddLastArg(CmdArgs, options::OPT_index_ignore_pcms);
6480+
Args.AddLastArg(CmdArgs, options::OPT_index_store_compress);
64806481

64816482
// If '-o' is passed along with '-fsyntax-only' pass it along the cc1
64826483
// 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)