forked from OSchip/llvm-project
Rename the command-line option for mapping #include/#import over to
module imports from -fauto-module-import to -fmodules. The new name will eventually be used to enable modules, and the #include/#import mapping is a crucial part of the feature. llvm-svn: 147447
This commit is contained in:
parent
a3e8b00f75
commit
2f197adeeb
|
@ -650,9 +650,8 @@ def fmodule_name : Joined<"-fmodule-name=">,
|
|||
HelpText<"Specify the name of the module to build">;
|
||||
def fdisable_module_hash : Flag<"-fdisable-module-hash">,
|
||||
HelpText<"Disable the module hash">;
|
||||
def fauto_module_import : Flag<"-fauto-module-import">,
|
||||
HelpText<"Automatically translate #include/#import into module imports "
|
||||
"when possible">;
|
||||
def fmodules : Flag<"-fmodules">,
|
||||
HelpText<"Enable the 'modules' language feature">;
|
||||
|
||||
def F : JoinedOrSeparate<"-F">, MetaVarName<"<directory>">,
|
||||
HelpText<"Add directory to framework include search path">;
|
||||
|
|
|
@ -380,8 +380,7 @@ def fmsc_version : Joined<"-fmsc-version=">, Group<f_Group>;
|
|||
def fdelayed_template_parsing : Flag<"-fdelayed-template-parsing">, Group<f_Group>;
|
||||
def fmodule_cache_path : Separate<"-fmodule-cache-path">, Group<i_Group>,
|
||||
Flags<[NoForward]>;
|
||||
def fauto_module_import : Flag <"-fauto-module-import">, Group<f_Group>,
|
||||
Flags<[NoForward]>;
|
||||
def fmodules : Flag <"-fmodules">, Group<f_Group>, Flags<[NoForward]>;
|
||||
|
||||
def fmudflapth : Flag<"-fmudflapth">, Group<f_Group>;
|
||||
def fmudflap : Flag<"-fmudflap">, Group<f_Group>;
|
||||
|
|
|
@ -395,7 +395,7 @@ void Clang::AddPreprocessingOptions(Compilation &C,
|
|||
CmdArgs.push_back(Args.MakeArgString(DefaultModuleCache));
|
||||
}
|
||||
|
||||
Args.AddAllArgs(CmdArgs, options::OPT_fauto_module_import);
|
||||
Args.AddAllArgs(CmdArgs, options::OPT_fmodules);
|
||||
|
||||
// Parse additional include paths from environment variables.
|
||||
// FIXME: We should probably sink the logic for handling these from the
|
||||
|
|
|
@ -1903,7 +1903,7 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
|
|||
Opts.TokenCache = Opts.ImplicitPTHInclude;
|
||||
Opts.UsePredefines = !Args.hasArg(OPT_undef);
|
||||
Opts.DetailedRecord = Args.hasArg(OPT_detailed_preprocessing_record);
|
||||
Opts.AutoModuleImport = Args.hasArg(OPT_fauto_module_import);
|
||||
Opts.AutoModuleImport = Args.hasArg(OPT_fmodules);
|
||||
Opts.DisablePCHValidation = Args.hasArg(OPT_fno_validate_pch);
|
||||
|
||||
Opts.DumpDeserializedPCHDecls = Args.hasArg(OPT_dump_deserialized_pch_decls);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// other file: expected-note{{'no_umbrella_A_private' declared here}}
|
||||
|
||||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fauto-module-import -F %S/Inputs %s -verify
|
||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs %s -verify
|
||||
|
||||
#include <DependsOnModule/DependsOnModule.h> // expected-warning{{treating #include as an import of module 'DependsOnModule'}}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -x objective-c -Wauto-import -fmodule-cache-path %t -fauto-module-import -F %S/Inputs %s -verify
|
||||
// RUN: %clang_cc1 -x objective-c -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs %s -verify
|
||||
|
||||
__import_module__ Module.Sub;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Note: inside the module. expected-note{{'nested_umbrella_a' declared here}}
|
||||
|
||||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/normal-module-map %s -verify
|
||||
// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fmodules -I %S/Inputs/normal-module-map %s -verify
|
||||
#include "Umbrella/umbrella_sub.h"
|
||||
|
||||
int getUmbrella() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fauto-module-import -F %S/Inputs %s -verify
|
||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs %s -verify
|
||||
|
||||
__import_module__ DependsOnModule.CXX; // expected-error{{module 'DependsOnModule.CXX' requires feature 'cplusplus'}}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fauto-module-import -F %S/Inputs %s -verify
|
||||
// RUN: %clang_cc1 -x objective-c++ -Wauto-import -fmodule-cache-path %t -fauto-module-import -F %S/Inputs %s -verify
|
||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs %s -verify
|
||||
// RUN: %clang_cc1 -x objective-c++ -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs %s -verify
|
||||
|
||||
__import_module__ DependsOnModule;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -Eonly -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/submodules %s -verify
|
||||
// RUN: %clang_cc1 -Eonly -fmodule-cache-path %t -fmodules -I %S/Inputs/submodules %s -verify
|
||||
|
||||
__import_module__ std.vector;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/submodules %s -verify
|
||||
// RUN: %clang_cc1 -fmodule-cache-path %t -fmodules -I %S/Inputs/submodules %s -verify
|
||||
|
||||
__import_module__ std.vector;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fauto-module-import -F %S/Inputs %s -verify
|
||||
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs %s -verify
|
||||
|
||||
// Note: transitively imports Module.Sub2.
|
||||
__import_module__ Module.Sub;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang_cc1 -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/wildcard-submodule-exports %s -verify
|
||||
// RUN: %clang_cc1 -fmodule-cache-path %t -fmodules -I %S/Inputs/wildcard-submodule-exports %s -verify
|
||||
|
||||
__import_module__ C.One;
|
||||
|
||||
|
|
Loading…
Reference in New Issue