Enable the global module index by default. Introduce the
-fno-modules-global-index -cc1 option to allow one to disable the index for performance testing purposes, but with a 10% win in -fsyntax-only time, there is no reason a user would do this. llvm-svn: 173707
This commit is contained in:
parent
2e4ae4e154
commit
137f1b991e
|
@ -289,8 +289,8 @@ def ast_dump_filter : Separate<["-"], "ast-dump-filter">,
|
||||||
HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
|
HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
|
||||||
" nodes having a certain substring in a qualified name. Use"
|
" nodes having a certain substring in a qualified name. Use"
|
||||||
" -ast-list to list all filterable declaration node names.">;
|
" -ast-list to list all filterable declaration node names.">;
|
||||||
def fmodules_global_index : Flag<["-"], "fmodules-global-index">,
|
def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">,
|
||||||
HelpText<"Automatically generate or update the global module index">;
|
HelpText<"Do not automatically generate or update the global module index">;
|
||||||
|
|
||||||
let Group = Action_Group in {
|
let Group = Action_Group in {
|
||||||
|
|
||||||
|
|
|
@ -213,8 +213,8 @@ public:
|
||||||
ShowStats(false), ShowTimers(false), ShowVersion(false),
|
ShowStats(false), ShowTimers(false), ShowVersion(false),
|
||||||
FixWhatYouCan(false), FixOnlyWarnings(false), FixAndRecompile(false),
|
FixWhatYouCan(false), FixOnlyWarnings(false), FixAndRecompile(false),
|
||||||
FixToTemporaries(false), ARCMTMigrateEmitARCErrors(false),
|
FixToTemporaries(false), ARCMTMigrateEmitARCErrors(false),
|
||||||
SkipFunctionBodies(false), UseGlobalModuleIndex(false),
|
SkipFunctionBodies(false), UseGlobalModuleIndex(true),
|
||||||
GenerateGlobalModuleIndex(false),
|
GenerateGlobalModuleIndex(true),
|
||||||
ARCMTAction(ARCMT_None), ObjCMTAction(ObjCMT_None),
|
ARCMTAction(ARCMT_None), ObjCMTAction(ObjCMT_None),
|
||||||
ProgramAction(frontend::ParseSyntaxOnly)
|
ProgramAction(frontend::ParseSyntaxOnly)
|
||||||
{}
|
{}
|
||||||
|
|
|
@ -689,7 +689,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
|
||||||
Opts.FixAndRecompile = Args.hasArg(OPT_fixit_recompile);
|
Opts.FixAndRecompile = Args.hasArg(OPT_fixit_recompile);
|
||||||
Opts.FixToTemporaries = Args.hasArg(OPT_fixit_to_temp);
|
Opts.FixToTemporaries = Args.hasArg(OPT_fixit_to_temp);
|
||||||
Opts.ASTDumpFilter = Args.getLastArgValue(OPT_ast_dump_filter);
|
Opts.ASTDumpFilter = Args.getLastArgValue(OPT_ast_dump_filter);
|
||||||
Opts.UseGlobalModuleIndex = Args.hasArg(OPT_fmodules_global_index);
|
Opts.UseGlobalModuleIndex = !Args.hasArg(OPT_fno_modules_global_index);
|
||||||
Opts.GenerateGlobalModuleIndex = Opts.UseGlobalModuleIndex;
|
Opts.GenerateGlobalModuleIndex = Opts.UseGlobalModuleIndex;
|
||||||
|
|
||||||
Opts.CodeCompleteOpts.IncludeMacros
|
Opts.CodeCompleteOpts.IncludeMacros
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// RUN: rm -rf %t
|
// RUN: rm -rf %t
|
||||||
// Run without global module index
|
// Run without global module index
|
||||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify
|
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -fno-modules-global-index -F %S/Inputs %s -verify
|
||||||
// RUN: ls %t|not grep modules.idx
|
// RUN: ls %t|not grep modules.idx
|
||||||
// Run and create the global module index
|
// Run and create the global module index
|
||||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -fmodules-global-index -F %S/Inputs %s -verify
|
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify
|
||||||
// RUN: ls %t|grep modules.idx
|
// RUN: ls %t|grep modules.idx
|
||||||
// Run and use the global module index
|
// Run and use the global module index
|
||||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -fmodules-global-index -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s
|
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s
|
||||||
|
|
||||||
// expected-no-diagnostics
|
// expected-no-diagnostics
|
||||||
@import DependsOnModule;
|
@import DependsOnModule;
|
||||||
|
|
Loading…
Reference in New Issue