diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def index 95d3f0682abd..9fbb78c89733 100644 --- a/clang/include/clang/Basic/LangOptions.def +++ b/clang/include/clang/Basic/LangOptions.def @@ -128,7 +128,6 @@ COMPATIBLE_LANGOPT(ModulesDeclUse , 1, 0, "require declaration of module uses LANGOPT(ModulesSearchAll , 1, 1, "search even non-imported modules to find unresolved references") COMPATIBLE_LANGOPT(ModulesStrictDeclUse, 1, 0, "require declaration of module uses and all headers to be in modules") LANGOPT(ModulesErrorRecovery, 1, 1, "automatically import modules as needed when performing error recovery") -BENIGN_LANGOPT(ModulesImplicitMaps, 1, 1, "use files called module.modulemap implicitly as module maps") BENIGN_LANGOPT(ImplicitModules, 1, 1, "build modules that are not specified via -fmodule-file") COMPATIBLE_LANGOPT(ModulesLocalVisibility, 1, 0, "local submodule visibility") COMPATIBLE_LANGOPT(Optimize , 1, 0, "__OPTIMIZE__ predefined macro") diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td index 81fc280e4460..cc62fb4d9144 100644 --- a/clang/include/clang/Driver/CC1Options.td +++ b/clang/include/clang/Driver/CC1Options.td @@ -352,8 +352,8 @@ def ast_dump_filter : Separate<["-"], "ast-dump-filter">, HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration" " nodes having a certain substring in a qualified name. Use" " -ast-list to list all filterable declaration node names.">; -def fmodules_implicit_maps : Flag <["-"], "fmodules-implicit-maps">; -def fno_modules_implicit_maps : Flag <["-"], "fno-modules-implicit-maps">; +def fimplicit_module_maps : Flag<["-"], "fimplicit-module-maps">, + HelpText<"Implicitly search the file system for module map files.">; def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">, HelpText<"Do not automatically generate or update the global module index">; def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">, diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 5a2e387c7714..493757aba3f7 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -692,7 +692,7 @@ def fmodules : Flag <["-"], "fmodules">, Group, Flags<[DriverOption, CC1Option]>, HelpText<"Enable the 'modules' language feature">; def fmodule_maps : Flag <["-"], "fmodule-maps">, Group, - Flags<[DriverOption,CC1Option]>, + Flags<[DriverOption]>, HelpText<"Read module maps to understand the structure of library headers">; def fmodule_name : JoinedOrSeparate<["-"], "fmodule-name=">, Group, Flags<[DriverOption,CC1Option]>, MetaVarName<"">, diff --git a/clang/include/clang/Lex/HeaderSearchOptions.h b/clang/include/clang/Lex/HeaderSearchOptions.h index 316134c405b3..c9c32609f19b 100644 --- a/clang/include/clang/Lex/HeaderSearchOptions.h +++ b/clang/include/clang/Lex/HeaderSearchOptions.h @@ -98,8 +98,9 @@ public: /// Note: Only used for testing! unsigned DisableModuleHash : 1; - /// \brief Interpret module maps. This option is implied by full modules. - unsigned ModuleMaps : 1; + /// \brief Implicit module maps. This option is enabld by default when + /// modules is enabled. + unsigned ImplicitModuleMaps : 1; /// \brief Set the 'home directory' of a module map file to the current /// working directory (or the home directory of the module map file that @@ -166,7 +167,7 @@ public: public: HeaderSearchOptions(StringRef _Sysroot = "/") - : Sysroot(_Sysroot), DisableModuleHash(0), ModuleMaps(0), + : Sysroot(_Sysroot), DisableModuleHash(0), ImplicitModuleMaps(0), ModuleMapFileHomeIsCwd(0), ModuleCachePruneInterval(7*24*60*60), ModuleCachePruneAfter(31*24*60*60), diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 800053cc9316..99352a4de07a 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -4135,9 +4135,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-fblocks-runtime-optional"); } - // -fmodules enables modules (off by default). + // -fmodules enables the use of precompiled modules (off by default). // Users can pass -fno-cxx-modules to turn off modules support for - // C++/Objective-C++ programs, which is a little less mature. + // C++/Objective-C++ programs. bool HaveModules = false; if (Args.hasFlag(options::OPT_fmodules, options::OPT_fno_modules, false)) { bool AllowedInCXX = Args.hasFlag(options::OPT_fcxx_modules, @@ -4149,11 +4149,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } - // -fmodule-maps enables module map processing (off by default) for header - // checking. It is implied by -fmodules. + // -fmodule-maps enables implicit reading of module map files. By default, + // this is enabled if we are using precompiled modules. if (Args.hasFlag(options::OPT_fmodule_maps, options::OPT_fno_module_maps, - false)) { - CmdArgs.push_back("-fmodule-maps"); + HaveModules)) { + CmdArgs.push_back("-fimplicit-module-maps"); } // -fmodules-decluse checks that modules used are declared so (off by diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index f4480bb28980..9c09ff502566 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1095,8 +1095,7 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) { Opts.ModuleCachePath = Args.getLastArgValue(OPT_fmodules_cache_path); Opts.ModuleUserBuildPath = Args.getLastArgValue(OPT_fmodules_user_build_path); Opts.DisableModuleHash = Args.hasArg(OPT_fdisable_module_hash); - // -fmodules implies -fmodule-maps - Opts.ModuleMaps = Args.hasArg(OPT_fmodule_maps) || Args.hasArg(OPT_fmodules); + Opts.ImplicitModuleMaps = Args.hasArg(OPT_fimplicit_module_maps); Opts.ModuleMapFileHomeIsCwd = Args.hasArg(OPT_fmodule_map_file_home_is_cwd); Opts.ModuleCachePruneInterval = getLastArgIntValue(Args, OPT_fmodules_prune_interval, 7 * 24 * 60 * 60); @@ -1525,8 +1524,6 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, !Args.hasArg(OPT_fno_modules_search_all) && Args.hasArg(OPT_fmodules_search_all); Opts.ModulesErrorRecovery = !Args.hasArg(OPT_fno_modules_error_recovery); - Opts.ModulesImplicitMaps = Args.hasFlag(OPT_fmodules_implicit_maps, - OPT_fno_modules_implicit_maps, true); Opts.ImplicitModules = !Args.hasArg(OPT_fno_implicit_modules); Opts.CharIsSigned = Opts.OpenCL || !Args.hasArg(OPT_fno_signed_char); Opts.WChar = Opts.CPlusPlus && !Args.hasArg(OPT_fno_wchar); diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index ad7d3449ac4a..7a98f5418334 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -158,7 +158,7 @@ std::string HeaderSearch::getModuleFileName(StringRef ModuleName, Module *HeaderSearch::lookupModule(StringRef ModuleName, bool AllowSearch) { // Look in the module map to determine if there is a module by this name. Module *Module = ModMap.findModule(ModuleName); - if (Module || !AllowSearch || !LangOpts.ModulesImplicitMaps) + if (Module || !AllowSearch || !HSOpts->ImplicitModuleMaps) return Module; // Look through the various header search paths to load any available module @@ -1076,7 +1076,7 @@ StringRef HeaderSearch::getUniqueFrameworkName(StringRef Framework) { bool HeaderSearch::hasModuleMap(StringRef FileName, const DirectoryEntry *Root, bool IsSystem) { - if (!HSOpts->ModuleMaps || !LangOpts.ModulesImplicitMaps) + if (!HSOpts->ImplicitModuleMaps) return false; SmallVector FixUpDirectories; @@ -1203,7 +1203,7 @@ HeaderSearch::loadModuleMapFileImpl(const FileEntry *File, bool IsSystem, const FileEntry * HeaderSearch::lookupModuleMapFile(const DirectoryEntry *Dir, bool IsFramework) { - if (!LangOpts.ModulesImplicitMaps) + if (!HSOpts->ImplicitModuleMaps) return nullptr; // For frameworks, the preferred spelling is Modules/module.modulemap, but // module.map at the framework root is also accepted. @@ -1241,7 +1241,7 @@ Module *HeaderSearch::loadFrameworkModule(StringRef Name, // Try to infer a module map from the framework directory. - if (LangOpts.ModulesImplicitMaps) + if (HSOpts->ImplicitModuleMaps) return ModMap.inferFrameworkModule(Name, Dir, IsSystem, /*Parent=*/nullptr); return nullptr; @@ -1282,7 +1282,7 @@ HeaderSearch::loadModuleMapFile(const DirectoryEntry *Dir, bool IsSystem, void HeaderSearch::collectAllModules(SmallVectorImpl &Modules) { Modules.clear(); - if (LangOpts.ModulesImplicitMaps) { + if (HSOpts->ImplicitModuleMaps) { // Load module maps for each of the header search directories. for (unsigned Idx = 0, N = SearchDirs.size(); Idx != N; ++Idx) { bool IsSystem = SearchDirs[Idx].isSystemHeaderDirectory(); @@ -1333,7 +1333,7 @@ void HeaderSearch::collectAllModules(SmallVectorImpl &Modules) { } void HeaderSearch::loadTopLevelSystemModules() { - if (!LangOpts.ModulesImplicitMaps) + if (!HSOpts->ImplicitModuleMaps) return; // Load module maps for each of the header search directories. @@ -1351,7 +1351,7 @@ void HeaderSearch::loadTopLevelSystemModules() { } void HeaderSearch::loadSubdirectoryModuleMaps(DirectoryLookup &SearchDir) { - assert(LangOpts.ModulesImplicitMaps && + assert(HSOpts->ImplicitModuleMaps && "Should not be loading subdirectory module maps"); if (SearchDir.haveSearchedAllModuleMaps()) diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index c67ce248010f..6c98d01c170b 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -165,7 +165,8 @@ static bool isBuiltinHeader(StringRef FileName) { ModuleMap::HeadersMap::iterator ModuleMap::findKnownHeader(const FileEntry *File) { HeadersMap::iterator Known = Headers.find(File); - if (Known == Headers.end() && File->getDir() == BuiltinIncludeDir && + if (HeaderInfo.getHeaderSearchOpts().ImplicitModuleMaps && + Known == Headers.end() && File->getDir() == BuiltinIncludeDir && isBuiltinHeader(llvm::sys::path::filename(File->getName()))) { HeaderInfo.loadTopLevelSystemModules(); return Headers.find(File); @@ -176,6 +177,9 @@ ModuleMap::findKnownHeader(const FileEntry *File) { ModuleMap::KnownHeader ModuleMap::findHeaderInUmbrellaDirs(const FileEntry *File, SmallVectorImpl &IntermediateDirs) { + if (UmbrellaDirs.empty()) + return KnownHeader(); + const DirectoryEntry *Dir = File->getDir(); assert(Dir && "file in no directory"); diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index ec06e790f018..45b86329fb4f 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -1603,7 +1603,7 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, FilenameLoc, LangOpts.MSVCCompat ? NormalizedPath.c_str() : Filename, isAngled, LookupFrom, LookupFromFile, CurDir, Callbacks ? &SearchPath : nullptr, Callbacks ? &RelativePath : nullptr, - HeaderInfo.getHeaderSearchOpts().ModuleMaps ? &SuggestedModule : nullptr); + &SuggestedModule); if (!File) { if (Callbacks) { @@ -1620,9 +1620,7 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, FilenameLoc, LangOpts.MSVCCompat ? NormalizedPath.c_str() : Filename, isAngled, LookupFrom, LookupFromFile, CurDir, nullptr, nullptr, - HeaderInfo.getHeaderSearchOpts().ModuleMaps ? &SuggestedModule - : nullptr, - /*SkipCache*/ true); + &SuggestedModule, /*SkipCache*/ true); } } } @@ -1638,8 +1636,7 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, LookupFrom, LookupFromFile, CurDir, Callbacks ? &SearchPath : nullptr, Callbacks ? &RelativePath : nullptr, - HeaderInfo.getHeaderSearchOpts().ModuleMaps ? &SuggestedModule - : nullptr); + &SuggestedModule); if (File) { SourceRange Range(FilenameTok.getLocation(), CharEnd); Diag(FilenameTok, diag::err_pp_file_not_found_not_fatal) << diff --git a/clang/test/Modules/Rmodule-build.m b/clang/test/Modules/Rmodule-build.m index e8f293535178..5c27ec6dfd97 100644 --- a/clang/test/Modules/Rmodule-build.m +++ b/clang/test/Modules/Rmodule-build.m @@ -7,7 +7,7 @@ // RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap // RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -verify \ // RUN: -I %t -Rmodule-build @import A; // expected-remark{{building module 'A' as}} expected-remark {{finished building module 'A'}} @@ -16,19 +16,19 @@ @import B; // no diagnostic // RUN: echo ' ' >> %t/C.h -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ // RUN: -Rmodule-build 2>&1 | FileCheck %s // RUN: echo ' ' >> %t/C.h -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ // RUN: -Reverything 2>&1 | FileCheck %s // RUN: echo ' ' >> %t/B.h -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ // RUN: 2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s // RUN: echo ' ' >> %t/B.h -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fsyntax-only %s -I %t \ // RUN: -Rmodule-build -Rno-everything 2>&1 | \ // RUN: FileCheck -allow-empty -check-prefix=NO-REMARKS %s diff --git a/clang/test/Modules/Werror-Wsystem-headers.m b/clang/test/Modules/Werror-Wsystem-headers.m index 4391aa027977..164c5b2ab672 100644 --- a/clang/test/Modules/Werror-Wsystem-headers.m +++ b/clang/test/Modules/Werror-Wsystem-headers.m @@ -3,17 +3,17 @@ // RUN: mkdir %t-saved // Initial module build -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -isystem %S/Inputs/System/usr/include -fsyntax-only %s -verify // RUN: cp %t/cstd.pcm %t-saved/cstd.pcm // Even with -Werror don't rebuild a system module -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -isystem %S/Inputs/System/usr/include -fsyntax-only %s -verify -Werror // RUN: diff %t/cstd.pcm %t-saved/cstd.pcm // Unless -Wsystem-headers is on -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -isystem %S/Inputs/System/usr/include -fsyntax-only %s -verify \ // RUN: -Werror=unused -Wsystem-headers // RUN: not diff %t/cstd.pcm %t-saved/cstd.pcm diff --git a/clang/test/Modules/Werror.m b/clang/test/Modules/Werror.m index 6444ea513b81..4c3f3ea74464 100644 --- a/clang/test/Modules/Werror.m +++ b/clang/test/Modules/Werror.m @@ -3,37 +3,37 @@ // RUN: mkdir -p %t-saved // Initial module build (-Werror=header-guard) -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -Werror=header-guard // RUN: cp %t/Module.pcm %t-saved/Module.pcm // Building with looser -Werror options does not rebuild -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella // RUN: diff %t/Module.pcm %t-saved/Module.pcm // Make the build more restricted (-Werror) -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -Werror -Wno-incomplete-umbrella // RUN: not diff %t/Module.pcm %t-saved/Module.pcm // RUN: cp %t/Module.pcm %t-saved/Module.pcm // Ensure -Werror=header-guard is less strict than -Werror -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -Werror=header-guard -Wno-incomplete-umbrella // RUN: diff %t/Module.pcm %t-saved/Module.pcm // But -Werror=unused is not, because some of its diags are DefaultIgnore -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -Werror=unused // RUN: not diff %t/Module.pcm %t-saved/Module.pcm // RUN: cp %t/Module.pcm %t-saved/Module.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -Werror -Wno-incomplete-umbrella @@ -42,30 +42,30 @@ // RUN-DISABLED: diff %t/Module.pcm %t-saved/Module.pcm // -Wno-everything, -Werror -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -Wno-everything -Wall -Werror // RUN: cp %t/Module.pcm %t-saved/Module.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -Wall -Werror // RUN: not diff %t/Module.pcm %t-saved/Module.pcm // -pedantic, -Werror is not compatible with -Wall -Werror -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -Werror -pedantic // RUN: not diff %t/Module.pcm %t-saved/Module.pcm // RUN: cp %t/Module.pcm %t-saved/Module.pcm // -pedantic-errors is less strict that -pedantic, -Werror -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -pedantic-errors // RUN: diff %t/Module.pcm %t-saved/Module.pcm // -Wsystem-headers does not affect non-system modules -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \ // RUN: -pedantic-errors -Wsystem-headers // RUN: diff %t/Module.pcm %t-saved/Module.pcm diff --git a/clang/test/Modules/add-remove-private.m b/clang/test/Modules/add-remove-private.m index 49e81e11141d..dc73a096c807 100644 --- a/clang/test/Modules/add-remove-private.m +++ b/clang/test/Modules/add-remove-private.m @@ -4,20 +4,20 @@ // RUN: cp -r %S/Inputs/AddRemovePrivate.framework %t/AddRemovePrivate.framework // Build with module.private.modulemap -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP // RUN: cp %t.mcp/AddRemovePrivate.pcm %t/with.pcm // Build without module.private.modulemap // RUN: rm %t/AddRemovePrivate.framework/Modules/module.private.modulemap -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify // RUN: not diff %t.mcp/AddRemovePrivate.pcm %t/with.pcm // RUN: cp %t.mcp/AddRemovePrivate.pcm %t/without.pcm -// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -DP 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -DP 2>&1 | FileCheck %s // CHECK: no submodule named 'Private' // Build with module.private.modulemap (again) // RUN: cp %S/Inputs/AddRemovePrivate.framework/Modules/module.private.modulemap %t/AddRemovePrivate.framework/Modules/module.private.modulemap -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP // RUN: not diff %t.mcp/AddRemovePrivate.pcm %t/without.pcm // expected-no-diagnostics diff --git a/clang/test/Modules/anon-namespace.cpp b/clang/test/Modules/anon-namespace.cpp index 6c085ebc8858..dc25c91ac0c4 100644 --- a/clang/test/Modules/anon-namespace.cpp +++ b/clang/test/Modules/anon-namespace.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/anon-namespace -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/anon-namespace -verify %s // expected-no-diagnostics #include "b1.h" #include "c.h" diff --git a/clang/test/Modules/attr-unavailable.m b/clang/test/Modules/attr-unavailable.m index 0188a84d9816..b7954ca4cef2 100644 --- a/clang/test/Modules/attr-unavailable.m +++ b/clang/test/Modules/attr-unavailable.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/attr-unavailable %s -fsyntax-only -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/attr-unavailable %s -fsyntax-only -verify @import two; void f(id x) { diff --git a/clang/test/Modules/auto-module-import.m b/clang/test/Modules/auto-module-import.m index bf9937778631..de2c355a4247 100644 --- a/clang/test/Modules/auto-module-import.m +++ b/clang/test/Modules/auto-module-import.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify -DERRORS -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify -DERRORS +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify // // Test both with and without the declarations that refer to unimported // entities. For error recovery, those cases implicitly trigger an import. diff --git a/clang/test/Modules/autolink.m b/clang/test/Modules/autolink.m index e6507703be96..28b9e40678f6 100644 --- a/clang/test/Modules/autolink.m +++ b/clang/test/Modules/autolink.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -emit-pch -fmodules-cache-path=%t -fmodules -o %t.pch -I %S/Inputs -x objective-c-header %S/Inputs/autolink-sub3.pch -// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -fmodules -F %S/Inputs -I %S/Inputs -include-pch %t.pch %s | FileCheck %s -// RUN: %clang_cc1 -emit-llvm -fno-autolink -o - -fmodules-cache-path=%t -fmodules -F %S/Inputs -I %S/Inputs -include-pch %t.pch %s | FileCheck --check-prefix=CHECK-AUTOLINK-DISABLED %s +// RUN: %clang_cc1 -emit-pch -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -o %t.pch -I %S/Inputs -x objective-c-header %S/Inputs/autolink-sub3.pch +// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -I %S/Inputs -include-pch %t.pch %s | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -fno-autolink -o - -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -I %S/Inputs -include-pch %t.pch %s | FileCheck --check-prefix=CHECK-AUTOLINK-DISABLED %s @import autolink.sub2; diff --git a/clang/test/Modules/build-fail-notes.m b/clang/test/Modules/build-fail-notes.m index e27341154d79..47bdbc7fca6c 100644 --- a/clang/test/Modules/build-fail-notes.m +++ b/clang/test/Modules/build-fail-notes.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s @import DependsOnModule; @@ -11,14 +11,14 @@ // CHECK: fatal error: could not build module 'DependsOnModule' // CHECK-NOT: error: -// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -fdiagnostics-show-note-include-stack 2>&1 | FileCheck -check-prefix=CHECK-REDEF %s +// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -fdiagnostics-show-note-include-stack 2>&1 | FileCheck -check-prefix=CHECK-REDEF %s extern int Module; // CHECK-REDEF: In module 'DependsOnModule' imported from // CHECK-REDEF: In module 'Module' imported from // CHECK-REDEF: Module.h:15:12: note: previous definition is here -// RUN: not %clang_cc1 -Wincomplete-umbrella -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" -serialize-diagnostic-file %t/tmp.diag %s 2>&1 +// RUN: not %clang_cc1 -Wincomplete-umbrella -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -DgetModuleVersion="epic fail" -serialize-diagnostic-file %t/tmp.diag %s 2>&1 // RUN: c-index-test -read-diagnostics %t/tmp.diag 2>&1 | FileCheck -check-prefix=CHECK-SDIAG %s // CHECK-SDIAG: Module.h:9:13: error: expected ';' after top level declarator diff --git a/clang/test/Modules/builtins.m b/clang/test/Modules/builtins.m index 40b4f9c74395..c095f4f01645 100644 --- a/clang/test/Modules/builtins.m +++ b/clang/test/Modules/builtins.m @@ -12,5 +12,5 @@ int bar() { // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -I %S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs %s -verify // expected-no-diagnostics diff --git a/clang/test/Modules/compiler_builtins.m b/clang/test/Modules/compiler_builtins.m index f120bcfd9824..bffbcc6ddee5 100644 --- a/clang/test/Modules/compiler_builtins.m +++ b/clang/test/Modules/compiler_builtins.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang -fsyntax-only -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -I%S/Inputs/System/usr/include -Xclang -verify -// RUN: %clang -fsyntax-only -std=c99 -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -I%S/Inputs/System/usr/include -Xclang -verify +// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -I%S/Inputs/System/usr/include -verify +// RUN: %clang_cc1 -fsyntax-only -std=c99 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -I%S/Inputs/System/usr/include -verify // expected-no-diagnostics #ifdef __SSE__ diff --git a/clang/test/Modules/compiler_builtins_arm.m b/clang/test/Modules/compiler_builtins_arm.m index 5da6a12fb3a6..ccfceaa93f88 100644 --- a/clang/test/Modules/compiler_builtins_arm.m +++ b/clang/test/Modules/compiler_builtins_arm.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fsyntax-only -triple thumbv7-none-linux-gnueabihf -target-abi aapcs -target-cpu cortex-a8 -mfloat-abi hard -std=c99 -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -verify +// RUN: %clang_cc1 -fsyntax-only -triple thumbv7-none-linux-gnueabihf -target-abi aapcs -target-cpu cortex-a8 -mfloat-abi hard -std=c99 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -D__need_wint_t %s -verify // expected-no-diagnostics @import _Builtin_intrinsics.arm.neon; diff --git a/clang/test/Modules/config_macros.m b/clang/test/Modules/config_macros.m index b147317bf60d..5c54ba97a17b 100644 --- a/clang/test/Modules/config_macros.m +++ b/clang/test/Modules/config_macros.m @@ -23,6 +23,6 @@ char *test_bar() { @import config; // expected-warning{{definition of configuration macro 'WANT_BAR' has no effect on the import of 'config'; pass '-DWANT_BAR=...' on the command line to configure the module}} // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -DWANT_FOO=1 -emit-module -fmodule-name=config %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -DWANT_FOO=1 %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -DWANT_FOO=1 -emit-module -fmodule-name=config %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -DWANT_FOO=1 %s -verify diff --git a/clang/test/Modules/conflicts.m b/clang/test/Modules/conflicts.m index 2388e6f1d1cf..d619721f72b3 100644 --- a/clang/test/Modules/conflicts.m +++ b/clang/test/Modules/conflicts.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -I %S/Inputs/Conflicts %s -verify +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/Conflicts %s -verify @import Conflicts; diff --git a/clang/test/Modules/crashes.m b/clang/test/Modules/crashes.m index edefd379e8a5..c785bd19f229 100644 --- a/clang/test/Modules/crashes.m +++ b/clang/test/Modules/crashes.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t.mcp -// RUN: %clang_cc1 -fmodules-cache-path=%t.mcp -fmodules -F %S/Inputs -fobjc-arc %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t.mcp -fmodules -fimplicit-module-maps -F %S/Inputs -fobjc-arc %s -verify @import Module; diff --git a/clang/test/Modules/cstd.m b/clang/test/Modules/cstd.m index 200779a0f3d7..7df727d2efcb 100644 --- a/clang/test/Modules/cstd.m +++ b/clang/test/Modules/cstd.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fsyntax-only -isystem %S/Inputs/System/usr/include -ffreestanding -fmodules -fmodules-cache-path=%t -D__need_wint_t -Werror=implicit-function-declaration %s +// RUN: %clang_cc1 -fsyntax-only -isystem %S/Inputs/System/usr/include -ffreestanding -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -D__need_wint_t -Werror=implicit-function-declaration %s @import uses_other_constants; const double other_value = DBL_MAX; diff --git a/clang/test/Modules/cxx-decls.cpp b/clang/test/Modules/cxx-decls.cpp index 4064040c1257..2e606078c055 100644 --- a/clang/test/Modules/cxx-decls.cpp +++ b/clang/test/Modules/cxx-decls.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -ast-dump -ast-dump-filter merge -std=c++11 | FileCheck %s +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -ast-dump -ast-dump-filter merge -std=c++11 | FileCheck %s // expected-no-diagnostics diff --git a/clang/test/Modules/cxx-dtor.cpp b/clang/test/Modules/cxx-dtor.cpp index ead67ec334e7..63427ee0afda 100644 --- a/clang/test/Modules/cxx-dtor.cpp +++ b/clang/test/Modules/cxx-dtor.cpp @@ -1,3 +1,3 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs/cxx-dtor -emit-llvm-only %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs/cxx-dtor -emit-llvm-only %s #include "b.h" diff --git a/clang/test/Modules/cxx-inline-namespace.cpp b/clang/test/Modules/cxx-inline-namespace.cpp index f67d43b6843a..36b58ee611c7 100644 --- a/clang/test/Modules/cxx-inline-namespace.cpp +++ b/clang/test/Modules/cxx-inline-namespace.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 @import cxx_inline_namespace; @import cxx_inline_namespace_b; diff --git a/clang/test/Modules/cxx-irgen.cpp b/clang/test/Modules/cxx-irgen.cpp index 13902bf92622..37de23fd2548 100644 --- a/clang/test/Modules/cxx-irgen.cpp +++ b/clang/test/Modules/cxx-irgen.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-optzns -emit-llvm -o - %s | FileCheck %s -// RUN: %clang_cc1 -fmodules -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-optzns -emit-llvm -g -o - %s | FileCheck %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-optzns -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-optzns -emit-llvm -g -o - %s | FileCheck %s // FIXME: When we have a syntax for modules in C++, use that. @import cxx_irgen_top; diff --git a/clang/test/Modules/cxx-linkage-cache.cpp b/clang/test/Modules/cxx-linkage-cache.cpp index 296cc8034f5a..3ce55b4f6b8c 100644 --- a/clang/test/Modules/cxx-linkage-cache.cpp +++ b/clang/test/Modules/cxx-linkage-cache.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 @import cxx_linkage_cache; diff --git a/clang/test/Modules/cxx-lookup.cpp b/clang/test/Modules/cxx-lookup.cpp index bd019c7f4ae4..f3e272009fce 100644 --- a/clang/test/Modules/cxx-lookup.cpp +++ b/clang/test/Modules/cxx-lookup.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -I%S/Inputs/cxx-lookup -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -I%S/Inputs/cxx-lookup -verify // expected-no-diagnostics namespace llvm {} #include "c2.h" diff --git a/clang/test/Modules/cxx-many-overloads.cpp b/clang/test/Modules/cxx-many-overloads.cpp index 205a79cdf9e1..445245f37f51 100644 --- a/clang/test/Modules/cxx-many-overloads.cpp +++ b/clang/test/Modules/cxx-many-overloads.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify // expected-no-diagnostics @import cxx_many_overloads; diff --git a/clang/test/Modules/cxx-templates.cpp b/clang/test/Modules/cxx-templates.cpp index 00fc38b52209..d0f5a145a18a 100644 --- a/clang/test/Modules/cxx-templates.cpp +++ b/clang/test/Modules/cxx-templates.cpp @@ -1,9 +1,9 @@ // RUN: rm -rf %t -// RUN: not %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump-lookups | FileCheck %s --check-prefix=CHECK-GLOBAL -// RUN: not %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump-lookups -ast-dump-filter N | FileCheck %s --check-prefix=CHECK-NAMESPACE-N -// RUN: not %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-filter SomeTemplate | FileCheck %s --check-prefix=CHECK-DUMP -// RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -// RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -DEARLY_IMPORT +// RUN: not %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump-lookups | FileCheck %s --check-prefix=CHECK-GLOBAL +// RUN: not %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump-lookups -ast-dump-filter N | FileCheck %s --check-prefix=CHECK-NAMESPACE-N +// RUN: not %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-filter SomeTemplate | FileCheck %s --check-prefix=CHECK-DUMP +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -DEARLY_IMPORT #ifdef EARLY_IMPORT #include "cxx-templates-textual.h" diff --git a/clang/test/Modules/cycles.c b/clang/test/Modules/cycles.c index 47728d814c29..81495b57064c 100644 --- a/clang/test/Modules/cycles.c +++ b/clang/test/Modules/cycles.c @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -F %S/Inputs %s 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -F %S/Inputs %s 2>&1 | FileCheck %s // FIXME: When we have a syntax for modules in C, use that. @import MutuallyRecursive1; diff --git a/clang/test/Modules/declare-use-compatible.cpp b/clang/test/Modules/declare-use-compatible.cpp index 4c3d79bd71c9..a2e7f01c6c1d 100644 --- a/clang/test/Modules/declare-use-compatible.cpp +++ b/clang/test/Modules/declare-use-compatible.cpp @@ -1,33 +1,33 @@ // Used module not built with -decluse. // RUN: rm -rf %t -// RUN: %clang_cc1 -x c++ -fmodules -fmodule-name=XB -emit-module \ +// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm -// RUN: %clang_cc1 -x c++ -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodules-decluse \ // RUN: -fmodule-file=%t/b.pcm -fmodule-name=XE -I %S/Inputs/declare-use %s // // Main module not built with -decluse. // RUN: rm -rf %t -// RUN: %clang_cc1 -x c++ -fmodules -fmodule-name=XB -emit-module \ +// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ // RUN: -fmodules-decluse \ // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm -// RUN: %clang_cc1 -x c++ -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodule-file=%t/b.pcm -fmodule-name=XE -I %S/Inputs/declare-use %s // // Used module not built with -decluse. // RUN: rm -rf %t -// RUN: %clang_cc1 -x c++ -fmodules -fmodule-name=XB -emit-module \ +// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm -// RUN: %clang_cc1 -x c++ -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodules-strict-decluse \ // RUN: -fmodule-file=%t/b.pcm -fmodule-name=XE -I %S/Inputs/declare-use %s // // Main module not built with -decluse. // RUN: rm -rf %t -// RUN: %clang_cc1 -x c++ -fmodules -fmodule-name=XB -emit-module \ +// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ // RUN: -fmodules-strict-decluse \ // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm -// RUN: %clang_cc1 -x c++ -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodule-file=%t/b.pcm -fmodule-name=XE -I %S/Inputs/declare-use %s #include "b.h" diff --git a/clang/test/Modules/declare-use1.cpp b/clang/test/Modules/declare-use1.cpp index adba59556f8d..492f97a5ebe9 100644 --- a/clang/test/Modules/declare-use1.cpp +++ b/clang/test/Modules/declare-use1.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify +// RUN: %clang_cc1 -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify #include "g.h" #include "e.h" diff --git a/clang/test/Modules/declare-use2.cpp b/clang/test/Modules/declare-use2.cpp index 45352891685d..12689e9d9683 100644 --- a/clang/test/Modules/declare-use2.cpp +++ b/clang/test/Modules/declare-use2.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XH -I %S/Inputs/declare-use %s -verify +// RUN: %clang_cc1 -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XH -I %S/Inputs/declare-use %s -verify #include "h.h" #include "e.h" diff --git a/clang/test/Modules/declare-use3.cpp b/clang/test/Modules/declare-use3.cpp index 8b0bbfa756c3..baa6c77bad13 100644 --- a/clang/test/Modules/declare-use3.cpp +++ b/clang/test/Modules/declare-use3.cpp @@ -1,4 +1,4 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -include "g.h" -include "e.h" -include "f.h" -include "i.h" -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify +// RUN: %clang_cc1 -include "g.h" -include "e.h" -include "f.h" -include "i.h" -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify // expected-error {{module XG does not depend on a module exporting 'f.h'}} const int g2 = g1 + e + f + aux_i; diff --git a/clang/test/Modules/declare-use4.cpp b/clang/test/Modules/declare-use4.cpp index 1d346469f1ef..621422f0109b 100644 --- a/clang/test/Modules/declare-use4.cpp +++ b/clang/test/Modules/declare-use4.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify +// RUN: %clang_cc1 -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify #define ALLOWED_INC "b.h" diff --git a/clang/test/Modules/declare-use5.cpp b/clang/test/Modules/declare-use5.cpp index b34be0f1104b..db52f69c0175 100644 --- a/clang/test/Modules/declare-use5.cpp +++ b/clang/test/Modules/declare-use5.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XN -I %S/Inputs/declare-use %s -verify +// RUN: %clang_cc1 -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XN -I %S/Inputs/declare-use %s -verify #include "sub.h" diff --git a/clang/test/Modules/decldef.m b/clang/test/Modules/decldef.m index efd2d7c42c83..420c6774ecba 100644 --- a/clang/test/Modules/decldef.m +++ b/clang/test/Modules/decldef.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_EARLY -// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_EARLY +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify // expected-note@Inputs/def.h:5 {{previous}} diff --git a/clang/test/Modules/decldef.mm b/clang/test/Modules/decldef.mm index 2e2bd8a75e20..ab271fc2ba95 100644 --- a/clang/test/Modules/decldef.mm +++ b/clang/test/Modules/decldef.mm @@ -1,8 +1,8 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_1 -DUSE_2 -DUSE_3 -DUSE_4 -// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_2 -DUSE_3 -DUSE_4 -// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_3 -DUSE_4 -// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_4 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_1 -DUSE_2 -DUSE_3 -DUSE_4 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_2 -DUSE_3 -DUSE_4 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_3 -DUSE_4 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_4 // expected-note@Inputs/def.h:5 0-1{{previous}} // expected-note@Inputs/def.h:16 0-1{{previous}} diff --git a/clang/test/Modules/deferred-lookup.cpp b/clang/test/Modules/deferred-lookup.cpp index aaac389da0dc..ac9464a26fb4 100644 --- a/clang/test/Modules/deferred-lookup.cpp +++ b/clang/test/Modules/deferred-lookup.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/deferred-lookup -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/deferred-lookup -verify %s // expected-no-diagnostics namespace N { int f(int); } diff --git a/clang/test/Modules/dependency-dump-dependent-module.m b/clang/test/Modules/dependency-dump-dependent-module.m index 3b04435dd594..df7f5326bb6c 100644 --- a/clang/test/Modules/dependency-dump-dependent-module.m +++ b/clang/test/Modules/dependency-dump-dependent-module.m @@ -2,7 +2,7 @@ // files for both. // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -module-dependency-dir %t/vfs -F %S/Inputs -I %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -module-dependency-dir %t/vfs -F %S/Inputs -I %S/Inputs -verify %s // expected-no-diagnostics // RUN: FileCheck %s -check-prefix=VFS < %t/vfs/vfs.yaml diff --git a/clang/test/Modules/dependency-dump.m b/clang/test/Modules/dependency-dump.m index 630af4950c18..f3a487544b8e 100644 --- a/clang/test/Modules/dependency-dump.m +++ b/clang/test/Modules/dependency-dump.m @@ -2,7 +2,7 @@ // for the same. // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -module-dependency-dir %t/vfs -F %S/Inputs -I %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -module-dependency-dir %t/vfs -F %S/Inputs -I %S/Inputs -verify %s // expected-no-diagnostics // RUN: FileCheck %s -check-prefix=VFS -input-file %t/vfs/vfs.yaml diff --git a/clang/test/Modules/dependency-gen-inferred-map.m b/clang/test/Modules/dependency-gen-inferred-map.m index 11cc87288115..cebfeea4f40b 100644 --- a/clang/test/Modules/dependency-gen-inferred-map.m +++ b/clang/test/Modules/dependency-gen-inferred-map.m @@ -1,7 +1,7 @@ // Test that the virtual file "__inferred_module.map" doesn't show up as dependency. // RUN: rm -rf %t-mcp -// RUN: %clang_cc1 -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -dependency-file %t.d -MT %s.o -F %S/Inputs -fsyntax-only -fmodules -fmodules-cache-path=%t-mcp %s +// RUN: %clang_cc1 -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -dependency-file %t.d -MT %s.o -F %S/Inputs -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-mcp %s // RUN: FileCheck %s < %t.d // CHECK-NOT: __inferred_module diff --git a/clang/test/Modules/dependency-gen-pch.m b/clang/test/Modules/dependency-gen-pch.m index 65e22d485dd2..697b42947afa 100644 --- a/clang/test/Modules/dependency-gen-pch.m +++ b/clang/test/Modules/dependency-gen-pch.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t-mcp // RUN: mkdir -p %t-mcp -// RUN: %clang_cc1 -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -module-file-deps -dependency-file %t.d -MT %s.o -I %S/Inputs -fmodules -fdisable-module-hash -fmodules-cache-path=%t-mcp -emit-pch -o %t.pch %s +// RUN: %clang_cc1 -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -module-file-deps -dependency-file %t.d -MT %s.o -I %S/Inputs -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t-mcp -emit-pch -o %t.pch %s // RUN: FileCheck %s < %t.d // CHECK: dependency-gen-pch.m.o // CHECK-NEXT: dependency-gen-pch.m diff --git a/clang/test/Modules/dependency-gen.m b/clang/test/Modules/dependency-gen.m index d3d66bfaab21..60a7192ed5a1 100644 --- a/clang/test/Modules/dependency-gen.m +++ b/clang/test/Modules/dependency-gen.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t-mcp // RUN: mkdir -p %t-mcp -// RUN: %clang_cc1 -x objective-c -isystem %S/Inputs/System/usr/include -dependency-file %t.d.1 -MT %s.o -I %S/Inputs -fsyntax-only -fmodules -fmodules-cache-path=%t-mcp %s +// RUN: %clang_cc1 -x objective-c -isystem %S/Inputs/System/usr/include -dependency-file %t.d.1 -MT %s.o -I %S/Inputs -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-mcp %s // RUN: FileCheck %s < %t.d.1 // CHECK: dependency-gen.m // CHECK: Inputs{{.}}diamond_top.h @@ -10,7 +10,7 @@ // CHECK-NOT: stdint.h -// RUN: %clang_cc1 -x objective-c -isystem %S/Inputs/System/usr/include -dependency-file %t.d.2 -MT %s.o -I %S/Inputs -sys-header-deps -fsyntax-only -fmodules -fmodules-cache-path=%t-mcp %s +// RUN: %clang_cc1 -x objective-c -isystem %S/Inputs/System/usr/include -dependency-file %t.d.2 -MT %s.o -I %S/Inputs -sys-header-deps -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-mcp %s // RUN: FileCheck %s -check-prefix=CHECK-SYS < %t.d.2 // CHECK-SYS: dependency-gen.m // CHECK-SYS: Inputs{{.}}diamond_top.h diff --git a/clang/test/Modules/dependency-gen.modulemap b/clang/test/Modules/dependency-gen.modulemap index 6aa2e007ebb8..a71bfe993826 100644 --- a/clang/test/Modules/dependency-gen.modulemap +++ b/clang/test/Modules/dependency-gen.modulemap @@ -1,7 +1,7 @@ // RUN: cd %S // RUN: rm -f %t.cpm %t-base.pcm %t-base.d %t.d -// RUN: %clang_cc1 -I. -x c++ -fmodule-maps -fmodule-name=test-base -fno-modules-implicit-maps -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse Inputs/dependency-gen-base.modulemap -dependency-file %t-base.d -MT %t-base.pcm -o %t-base.pcm -fmodule-map-file-home-is-cwd -// RUN: %clang_cc1 -I. -x c++ -fmodule-maps -fmodule-name=test -fno-modules-implicit-maps -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse -fmodule-file=%t-base.pcm %s -dependency-file %t.d -MT %t.pcm -o %t.pcm -fmodule-map-file-home-is-cwd +// RUN: %clang_cc1 -I. -x c++ -fmodule-name=test-base -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse Inputs/dependency-gen-base.modulemap -dependency-file %t-base.d -MT %t-base.pcm -o %t-base.pcm -fmodule-map-file-home-is-cwd +// RUN: %clang_cc1 -I. -x c++ -fmodule-name=test -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse -fmodule-file=%t-base.pcm %s -dependency-file %t.d -MT %t.pcm -o %t.pcm -fmodule-map-file-home-is-cwd // RUN: FileCheck %s < %t.d module "test" { export * diff --git a/clang/test/Modules/diag-pragma.c b/clang/test/Modules/diag-pragma.c index 89435c176ed5..63be4bf93afc 100644 --- a/clang/test/Modules/diag-pragma.c +++ b/clang/test/Modules/diag-pragma.c @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diag_pragma %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diag_pragma %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s // FIXME: When we have a syntax for modules in C, use that. @import diag_pragma; diff --git a/clang/test/Modules/diamond-pch.c b/clang/test/Modules/diamond-pch.c index f66ad877dee4..41cfd9c53b85 100644 --- a/clang/test/Modules/diamond-pch.c +++ b/clang/test/Modules/diamond-pch.c @@ -1,10 +1,10 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -emit-pch -fmodules-cache-path=%t -I %S/Inputs -o %t.pch %S/Inputs/diamond.h -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -include-pch %t.pch %s -I %S/Inputs -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-pch -fmodules-cache-path=%t -I %S/Inputs -o %t.pch %S/Inputs/diamond.h +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -include-pch %t.pch %s -I %S/Inputs -verify // FIXME: When we have a syntax for modules in C, use that. void test_diamond(int i, float f, double d, char c) { diff --git a/clang/test/Modules/diamond.c b/clang/test/Modules/diamond.c index 8b824081a1e3..c2e009fbc1d9 100644 --- a/clang/test/Modules/diamond.c +++ b/clang/test/Modules/diamond.c @@ -1,9 +1,9 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s -verify // FIXME: When we have a syntax for modules in C, use that. @import diamond_bottom; diff --git a/clang/test/Modules/direct-module-import.m b/clang/test/Modules/direct-module-import.m index 00c13faccf43..3216eb908ab6 100644 --- a/clang/test/Modules/direct-module-import.m +++ b/clang/test/Modules/direct-module-import.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -include Module/Module.h %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -include Module/Module.h %s -emit-llvm -o - | FileCheck %s // CHECK: call i8* @getModuleVersion const char* getVer(void) { diff --git a/clang/test/Modules/driver.c b/clang/test/Modules/driver.c index 79d1bbe13c07..34fc163a5ccd 100644 --- a/clang/test/Modules/driver.c +++ b/clang/test/Modules/driver.c @@ -1,5 +1,5 @@ -// RUN: %clang -fmodules %s -### 2>&1 | FileCheck -check-prefix CHECK-NO_MODULE_CACHE %s -// RUN: %clang -fmodules -fmodules-cache-path=blarg %s -### 2>&1 | FileCheck -check-prefix CHECK-WITH_MODULE_CACHE %s +// RUN: %clang -fmodules -fimplicit-module-maps %s -### 2>&1 | FileCheck -check-prefix CHECK-NO_MODULE_CACHE %s +// RUN: %clang -fmodules -fimplicit-module-maps -fmodules-cache-path=blarg %s -### 2>&1 | FileCheck -check-prefix CHECK-WITH_MODULE_CACHE %s // CHECK-NO_MODULE_CACHE: {{clang.*"-fmodules-cache-path=.*ModuleCache"}} diff --git a/clang/test/Modules/empty.modulemap b/clang/test/Modules/empty.modulemap index ef1d4a80ecfc..6350e2f63eb6 100644 --- a/clang/test/Modules/empty.modulemap +++ b/clang/test/Modules/empty.modulemap @@ -1,12 +1,12 @@ // RUN: rm -rf %t // // RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -emit-module -fmodule-name=empty -o %t/base.pcm \ // RUN: %s // // RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -emit-module -fmodule-name=empty -o %t/check.pcm \ // RUN: %s // diff --git a/clang/test/Modules/epic-fail.m b/clang/test/Modules/epic-fail.m index 7ce9571255f9..b368ceaec898 100644 --- a/clang/test/Modules/epic-fail.m +++ b/clang/test/Modules/epic-fail.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s @import Module; @import DependsOnModule; diff --git a/clang/test/Modules/exclude-header.c b/clang/test/Modules/exclude-header.c index 4134c82483d3..b3e6d8d6dd12 100644 --- a/clang/test/Modules/exclude-header.c +++ b/clang/test/Modules/exclude-header.c @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c -fmodules -fmodules-cache-path=%t -I %S/Inputs/exclude-header %s -verify +// RUN: %clang_cc1 -x objective-c -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/exclude-header %s -verify @import x; diff --git a/clang/test/Modules/explicit-build-relpath.cpp b/clang/test/Modules/explicit-build-relpath.cpp index f16556641d79..708c9fd208b8 100644 --- a/clang/test/Modules/explicit-build-relpath.cpp +++ b/clang/test/Modules/explicit-build-relpath.cpp @@ -4,38 +4,38 @@ // ---------------------- // Build modules A and B. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-name=a -emit-module %S/Inputs/explicit-build/module.modulemap -o a.pcm // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=a.pcm \ // RUN: -fmodule-name=b -emit-module %S/Inputs/explicit-build/module.modulemap -o b-rel.pcm // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-name=b -emit-module %S/Inputs/explicit-build/module.modulemap -o b-abs.pcm // ------------------------------------------ // Mix and match relative and absolute paths. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-file=a.pcm \ // RUN: -verify %s // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-file=b-rel.pcm \ // RUN: -verify %s // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=a.pcm \ // RUN: -fmodule-file=b-abs.pcm \ // RUN: -verify %s // -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=b-rel.pcm \ // RUN: -fmodule-file=b-abs.pcm \ diff --git a/clang/test/Modules/explicit-build.cpp b/clang/test/Modules/explicit-build.cpp index 6fe9f7ee46a3..01aa5dc68bf8 100644 --- a/clang/test/Modules/explicit-build.cpp +++ b/clang/test/Modules/explicit-build.cpp @@ -2,16 +2,16 @@ // ------------------------------- // Build chained modules A, B, and C -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-name=a -emit-module %S/Inputs/explicit-build/module.modulemap -o %t/a.pcm \ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-IMPLICIT-BUILD %s --allow-empty // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-name=b -emit-module %S/Inputs/explicit-build/module.modulemap -o %t/b.pcm \ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-IMPLICIT-BUILD %s --allow-empty // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/b.pcm \ // RUN: -fmodule-name=c -emit-module %S/Inputs/explicit-build/module.modulemap -o %t/c.pcm \ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-IMPLICIT-BUILD %s --allow-empty @@ -20,7 +20,7 @@ // ------------------------------- // Build B with an implicit build of A -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-name=b -emit-module %S/Inputs/explicit-build/module.modulemap -o %t/b-not-a.pcm \ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-B-NO-A %s // @@ -29,36 +29,36 @@ // ------------------------------- // Check that we can use the explicitly-built A, B, and C modules. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -verify %s -DHAVE_A // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-map-file=%S/Inputs/explicit-build/module.modulemap \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -verify %s -DHAVE_A // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/b.pcm \ // RUN: -verify %s -DHAVE_A -DHAVE_B // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-file=%t/b.pcm \ // RUN: -verify %s -DHAVE_A -DHAVE_B // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-file=%t/b.pcm \ // RUN: -fmodule-file=%t/c.pcm \ // RUN: -verify %s -DHAVE_A -DHAVE_B -DHAVE_C // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-file=%t/c.pcm \ @@ -67,12 +67,12 @@ // ------------------------------- // Check that -fmodule-file= in a module build makes the file transitively // available even if it's not used. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fno-implicit-modules -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fno-implicit-modules -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/b.pcm \ // RUN: -fmodule-name=d -emit-module %S/Inputs/explicit-build/module.modulemap -o %t/d.pcm \ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-IMPLICIT-BUILD %s --allow-empty // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fno-implicit-modules -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fno-implicit-modules -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/d.pcm \ // RUN: -verify %s -DHAVE_A -DHAVE_B @@ -104,35 +104,35 @@ // ------------------------------- // Check that we can use a mixture of implicit and explicit modules. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/b-not-a.pcm \ // RUN: -verify %s -DHAVE_A -DHAVE_B // ------------------------------- // Try to use two different flavors of the 'a' module. -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-file=%t/b-not-a.pcm \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-MULTIPLE-AS %s // -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-file=%t/b-not-a.pcm \ // RUN: -fmodule-map-file=%S/Inputs/explicit-build/module.modulemap \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-MULTIPLE-AS %s // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-name=a -emit-module %S/Inputs/explicit-build/module.modulemap -o %t/a-alt.pcm \ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-IMPLICIT-BUILD %s --allow-empty // -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-file=%t/a-alt.pcm \ // RUN: -fmodule-map-file=%S/Inputs/explicit-build/module.modulemap \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-MULTIPLE-AS %s // -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/a-alt.pcm \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-map-file=%S/Inputs/explicit-build/module.modulemap \ @@ -142,11 +142,11 @@ // ------------------------------- // Try to import a PCH with -fmodule-file= -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-name=a -emit-pch %S/Inputs/explicit-build/a.h -o %t/a.pch \ // RUN: 2>&1 | FileCheck --check-prefix=CHECK-NO-IMPLICIT-BUILD %s --allow-empty // -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/a.pch \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-A-AS-PCH %s // @@ -157,20 +157,20 @@ // // RUN: touch %t/not.pcm // -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/not.pcm \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-BAD-FILE %s // // CHECK-BAD-FILE: fatal error: file '{{.*}}not.pcm' is not a valid precompiled module file -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -fmodule-file=%t/nonexistent.pcm \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-FILE %s // // CHECK-NO-FILE: fatal error: module file '{{.*}}nonexistent.pcm' not found // RUN: mv %t/a.pcm %t/a-tmp.pcm -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/c.pcm \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-FILE-INDIRECT %s @@ -184,7 +184,7 @@ // Check that we don't get upset if B's timestamp is newer than C's. // RUN: touch %t/b.pcm // -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/c.pcm \ // RUN: -verify %s -DHAVE_A -DHAVE_B -DHAVE_C @@ -193,7 +193,7 @@ // // RUN: cp %t/b-not-a.pcm %t/b.pcm // -// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ +// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \ // RUN: -I%S/Inputs/explicit-build \ // RUN: -fmodule-file=%t/c.pcm \ // RUN: %s -DHAVE_A -DHAVE_B -DHAVE_C 2>&1 | FileCheck --check-prefix=CHECK-MISMATCHED-B %s diff --git a/clang/test/Modules/exponential-paths.cpp b/clang/test/Modules/exponential-paths.cpp index 34ab4205131d..b5641933f8d0 100644 --- a/clang/test/Modules/exponential-paths.cpp +++ b/clang/test/Modules/exponential-paths.cpp @@ -137,51 +137,51 @@ // // Explicitly build all the modules. // -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a0 -x c++ -emit-module %t/module.modulemap -o %t/a0.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b0 -x c++ -emit-module %t/module.modulemap -o %t/b0.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a1 -x c++ -emit-module %t/module.modulemap -o %t/a1.pcm -fmodule-file=%t/a0.pcm -fmodule-file=%t/b0.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b1 -x c++ -emit-module %t/module.modulemap -o %t/b1.pcm -fmodule-file=%t/a0.pcm -fmodule-file=%t/b0.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a2 -x c++ -emit-module %t/module.modulemap -o %t/a2.pcm -fmodule-file=%t/a1.pcm -fmodule-file=%t/b1.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b2 -x c++ -emit-module %t/module.modulemap -o %t/b2.pcm -fmodule-file=%t/a1.pcm -fmodule-file=%t/b1.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a3 -x c++ -emit-module %t/module.modulemap -o %t/a3.pcm -fmodule-file=%t/a2.pcm -fmodule-file=%t/b2.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b3 -x c++ -emit-module %t/module.modulemap -o %t/b3.pcm -fmodule-file=%t/a2.pcm -fmodule-file=%t/b2.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a4 -x c++ -emit-module %t/module.modulemap -o %t/a4.pcm -fmodule-file=%t/a3.pcm -fmodule-file=%t/b3.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b4 -x c++ -emit-module %t/module.modulemap -o %t/b4.pcm -fmodule-file=%t/a3.pcm -fmodule-file=%t/b3.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a5 -x c++ -emit-module %t/module.modulemap -o %t/a5.pcm -fmodule-file=%t/a4.pcm -fmodule-file=%t/b4.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b5 -x c++ -emit-module %t/module.modulemap -o %t/b5.pcm -fmodule-file=%t/a4.pcm -fmodule-file=%t/b4.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a6 -x c++ -emit-module %t/module.modulemap -o %t/a6.pcm -fmodule-file=%t/a5.pcm -fmodule-file=%t/b5.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b6 -x c++ -emit-module %t/module.modulemap -o %t/b6.pcm -fmodule-file=%t/a5.pcm -fmodule-file=%t/b5.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a7 -x c++ -emit-module %t/module.modulemap -o %t/a7.pcm -fmodule-file=%t/a6.pcm -fmodule-file=%t/b6.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b7 -x c++ -emit-module %t/module.modulemap -o %t/b7.pcm -fmodule-file=%t/a6.pcm -fmodule-file=%t/b6.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a8 -x c++ -emit-module %t/module.modulemap -o %t/a8.pcm -fmodule-file=%t/a7.pcm -fmodule-file=%t/b7.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b8 -x c++ -emit-module %t/module.modulemap -o %t/b8.pcm -fmodule-file=%t/a7.pcm -fmodule-file=%t/b7.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a9 -x c++ -emit-module %t/module.modulemap -o %t/a9.pcm -fmodule-file=%t/a8.pcm -fmodule-file=%t/b8.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b9 -x c++ -emit-module %t/module.modulemap -o %t/b9.pcm -fmodule-file=%t/a8.pcm -fmodule-file=%t/b8.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a10 -x c++ -emit-module %t/module.modulemap -o %t/a10.pcm -fmodule-file=%t/a9.pcm -fmodule-file=%t/b9.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b10 -x c++ -emit-module %t/module.modulemap -o %t/b10.pcm -fmodule-file=%t/a9.pcm -fmodule-file=%t/b9.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a11 -x c++ -emit-module %t/module.modulemap -o %t/a11.pcm -fmodule-file=%t/a10.pcm -fmodule-file=%t/b10.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b11 -x c++ -emit-module %t/module.modulemap -o %t/b11.pcm -fmodule-file=%t/a10.pcm -fmodule-file=%t/b10.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a12 -x c++ -emit-module %t/module.modulemap -o %t/a12.pcm -fmodule-file=%t/a11.pcm -fmodule-file=%t/b11.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b12 -x c++ -emit-module %t/module.modulemap -o %t/b12.pcm -fmodule-file=%t/a11.pcm -fmodule-file=%t/b11.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a13 -x c++ -emit-module %t/module.modulemap -o %t/a13.pcm -fmodule-file=%t/a12.pcm -fmodule-file=%t/b12.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b13 -x c++ -emit-module %t/module.modulemap -o %t/b13.pcm -fmodule-file=%t/a12.pcm -fmodule-file=%t/b12.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a14 -x c++ -emit-module %t/module.modulemap -o %t/a14.pcm -fmodule-file=%t/a13.pcm -fmodule-file=%t/b13.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b14 -x c++ -emit-module %t/module.modulemap -o %t/b14.pcm -fmodule-file=%t/a13.pcm -fmodule-file=%t/b13.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a15 -x c++ -emit-module %t/module.modulemap -o %t/a15.pcm -fmodule-file=%t/a14.pcm -fmodule-file=%t/b14.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b15 -x c++ -emit-module %t/module.modulemap -o %t/b15.pcm -fmodule-file=%t/a14.pcm -fmodule-file=%t/b14.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a16 -x c++ -emit-module %t/module.modulemap -o %t/a16.pcm -fmodule-file=%t/a15.pcm -fmodule-file=%t/b15.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b16 -x c++ -emit-module %t/module.modulemap -o %t/b16.pcm -fmodule-file=%t/a15.pcm -fmodule-file=%t/b15.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a17 -x c++ -emit-module %t/module.modulemap -o %t/a17.pcm -fmodule-file=%t/a16.pcm -fmodule-file=%t/b16.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b17 -x c++ -emit-module %t/module.modulemap -o %t/b17.pcm -fmodule-file=%t/a16.pcm -fmodule-file=%t/b16.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a18 -x c++ -emit-module %t/module.modulemap -o %t/a18.pcm -fmodule-file=%t/a17.pcm -fmodule-file=%t/b17.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b18 -x c++ -emit-module %t/module.modulemap -o %t/b18.pcm -fmodule-file=%t/a17.pcm -fmodule-file=%t/b17.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a19 -x c++ -emit-module %t/module.modulemap -o %t/a19.pcm -fmodule-file=%t/a18.pcm -fmodule-file=%t/b18.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b19 -x c++ -emit-module %t/module.modulemap -o %t/b19.pcm -fmodule-file=%t/a18.pcm -fmodule-file=%t/b18.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=a20 -x c++ -emit-module %t/module.modulemap -o %t/a20.pcm -fmodule-file=%t/a19.pcm -fmodule-file=%t/b19.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fmodule-name=b20 -x c++ -emit-module %t/module.modulemap -o %t/b20.pcm -fmodule-file=%t/a19.pcm -fmodule-file=%t/b19.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a0 -x c++ -emit-module %t/module.modulemap -o %t/a0.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b0 -x c++ -emit-module %t/module.modulemap -o %t/b0.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a1 -x c++ -emit-module %t/module.modulemap -o %t/a1.pcm -fmodule-file=%t/a0.pcm -fmodule-file=%t/b0.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b1 -x c++ -emit-module %t/module.modulemap -o %t/b1.pcm -fmodule-file=%t/a0.pcm -fmodule-file=%t/b0.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a2 -x c++ -emit-module %t/module.modulemap -o %t/a2.pcm -fmodule-file=%t/a1.pcm -fmodule-file=%t/b1.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b2 -x c++ -emit-module %t/module.modulemap -o %t/b2.pcm -fmodule-file=%t/a1.pcm -fmodule-file=%t/b1.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a3 -x c++ -emit-module %t/module.modulemap -o %t/a3.pcm -fmodule-file=%t/a2.pcm -fmodule-file=%t/b2.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b3 -x c++ -emit-module %t/module.modulemap -o %t/b3.pcm -fmodule-file=%t/a2.pcm -fmodule-file=%t/b2.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a4 -x c++ -emit-module %t/module.modulemap -o %t/a4.pcm -fmodule-file=%t/a3.pcm -fmodule-file=%t/b3.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b4 -x c++ -emit-module %t/module.modulemap -o %t/b4.pcm -fmodule-file=%t/a3.pcm -fmodule-file=%t/b3.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a5 -x c++ -emit-module %t/module.modulemap -o %t/a5.pcm -fmodule-file=%t/a4.pcm -fmodule-file=%t/b4.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b5 -x c++ -emit-module %t/module.modulemap -o %t/b5.pcm -fmodule-file=%t/a4.pcm -fmodule-file=%t/b4.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a6 -x c++ -emit-module %t/module.modulemap -o %t/a6.pcm -fmodule-file=%t/a5.pcm -fmodule-file=%t/b5.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b6 -x c++ -emit-module %t/module.modulemap -o %t/b6.pcm -fmodule-file=%t/a5.pcm -fmodule-file=%t/b5.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a7 -x c++ -emit-module %t/module.modulemap -o %t/a7.pcm -fmodule-file=%t/a6.pcm -fmodule-file=%t/b6.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b7 -x c++ -emit-module %t/module.modulemap -o %t/b7.pcm -fmodule-file=%t/a6.pcm -fmodule-file=%t/b6.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a8 -x c++ -emit-module %t/module.modulemap -o %t/a8.pcm -fmodule-file=%t/a7.pcm -fmodule-file=%t/b7.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b8 -x c++ -emit-module %t/module.modulemap -o %t/b8.pcm -fmodule-file=%t/a7.pcm -fmodule-file=%t/b7.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a9 -x c++ -emit-module %t/module.modulemap -o %t/a9.pcm -fmodule-file=%t/a8.pcm -fmodule-file=%t/b8.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b9 -x c++ -emit-module %t/module.modulemap -o %t/b9.pcm -fmodule-file=%t/a8.pcm -fmodule-file=%t/b8.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a10 -x c++ -emit-module %t/module.modulemap -o %t/a10.pcm -fmodule-file=%t/a9.pcm -fmodule-file=%t/b9.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b10 -x c++ -emit-module %t/module.modulemap -o %t/b10.pcm -fmodule-file=%t/a9.pcm -fmodule-file=%t/b9.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a11 -x c++ -emit-module %t/module.modulemap -o %t/a11.pcm -fmodule-file=%t/a10.pcm -fmodule-file=%t/b10.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b11 -x c++ -emit-module %t/module.modulemap -o %t/b11.pcm -fmodule-file=%t/a10.pcm -fmodule-file=%t/b10.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a12 -x c++ -emit-module %t/module.modulemap -o %t/a12.pcm -fmodule-file=%t/a11.pcm -fmodule-file=%t/b11.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b12 -x c++ -emit-module %t/module.modulemap -o %t/b12.pcm -fmodule-file=%t/a11.pcm -fmodule-file=%t/b11.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a13 -x c++ -emit-module %t/module.modulemap -o %t/a13.pcm -fmodule-file=%t/a12.pcm -fmodule-file=%t/b12.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b13 -x c++ -emit-module %t/module.modulemap -o %t/b13.pcm -fmodule-file=%t/a12.pcm -fmodule-file=%t/b12.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a14 -x c++ -emit-module %t/module.modulemap -o %t/a14.pcm -fmodule-file=%t/a13.pcm -fmodule-file=%t/b13.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b14 -x c++ -emit-module %t/module.modulemap -o %t/b14.pcm -fmodule-file=%t/a13.pcm -fmodule-file=%t/b13.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a15 -x c++ -emit-module %t/module.modulemap -o %t/a15.pcm -fmodule-file=%t/a14.pcm -fmodule-file=%t/b14.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b15 -x c++ -emit-module %t/module.modulemap -o %t/b15.pcm -fmodule-file=%t/a14.pcm -fmodule-file=%t/b14.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a16 -x c++ -emit-module %t/module.modulemap -o %t/a16.pcm -fmodule-file=%t/a15.pcm -fmodule-file=%t/b15.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b16 -x c++ -emit-module %t/module.modulemap -o %t/b16.pcm -fmodule-file=%t/a15.pcm -fmodule-file=%t/b15.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a17 -x c++ -emit-module %t/module.modulemap -o %t/a17.pcm -fmodule-file=%t/a16.pcm -fmodule-file=%t/b16.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b17 -x c++ -emit-module %t/module.modulemap -o %t/b17.pcm -fmodule-file=%t/a16.pcm -fmodule-file=%t/b16.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a18 -x c++ -emit-module %t/module.modulemap -o %t/a18.pcm -fmodule-file=%t/a17.pcm -fmodule-file=%t/b17.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b18 -x c++ -emit-module %t/module.modulemap -o %t/b18.pcm -fmodule-file=%t/a17.pcm -fmodule-file=%t/b17.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a19 -x c++ -emit-module %t/module.modulemap -o %t/a19.pcm -fmodule-file=%t/a18.pcm -fmodule-file=%t/b18.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b19 -x c++ -emit-module %t/module.modulemap -o %t/b19.pcm -fmodule-file=%t/a18.pcm -fmodule-file=%t/b18.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=a20 -x c++ -emit-module %t/module.modulemap -o %t/a20.pcm -fmodule-file=%t/a19.pcm -fmodule-file=%t/b19.pcm +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fmodule-name=b20 -x c++ -emit-module %t/module.modulemap -o %t/b20.pcm -fmodule-file=%t/a19.pcm -fmodule-file=%t/b19.pcm // // Build, using all the modules. -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%t -fsyntax-only %s \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%t -fsyntax-only %s \ // RUN: -fmodule-file=%t/a0.pcm -fmodule-file=%t/b0.pcm \ // RUN: -fmodule-file=%t/a1.pcm -fmodule-file=%t/b1.pcm \ // RUN: -fmodule-file=%t/a2.pcm -fmodule-file=%t/b2.pcm \ diff --git a/clang/test/Modules/extern_c.cpp b/clang/test/Modules/extern_c.cpp index ba466f2a53a2..f505c11f7c9d 100644 --- a/clang/test/Modules/extern_c.cpp +++ b/clang/test/Modules/extern_c.cpp @@ -1,16 +1,16 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_C -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_CXX -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_C -DEXTERN_CXX -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_C -DNAMESPACE -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_C -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_CXX -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_C -DEXTERN_CXX -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_C -DNAMESPACE -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs -x c %s -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs/elsewhere -I %S/Inputs %s -DEXTERN_C -DINDIRECT +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_C +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_CXX +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_C -DEXTERN_CXX +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_C -DNAMESPACE +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_C +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_CXX +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_C -DEXTERN_CXX +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_C -DNAMESPACE +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs -x c %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs/elsewhere -I %S/Inputs %s -DEXTERN_C -DINDIRECT #ifdef INDIRECT #include "c-header-indirect.h" diff --git a/clang/test/Modules/extern_c_bad.cpp b/clang/test/Modules/extern_c_bad.cpp index bafdc046ce0a..c34416a4b715 100644 --- a/clang/test/Modules/extern_c_bad.cpp +++ b/clang/test/Modules/extern_c_bad.cpp @@ -1,2 +1,2 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -verify -fmodules -x c++ -emit-module -fmodules-cache-path=%t -fmodule-name=c_library_bad %S/Inputs/module.map +// RUN: %clang_cc1 -verify -fmodules -fimplicit-module-maps -x c++ -emit-module -fmodules-cache-path=%t -fmodule-name=c_library_bad %S/Inputs/module.map diff --git a/clang/test/Modules/fatal-module-loader-error.m b/clang/test/Modules/fatal-module-loader-error.m index 2d8dd24e5135..99a42c2aff42 100644 --- a/clang/test/Modules/fatal-module-loader-error.m +++ b/clang/test/Modules/fatal-module-loader-error.m @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t // RUN: touch %t/Module.pcm -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -verify -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -DIMPLICIT -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -fdisable-module-hash -F %S/Inputs -DIMPLICIT -verify // This tests that after a fatal module loader error, we do not continue parsing. @@ -21,6 +21,6 @@ #endif // Also check that libclang does not create a PCH with such an error. -// RUN: not c-index-test -write-pch %t.pch -fmodules -fmodules-cache-path=%t \ +// RUN: not c-index-test -write-pch %t.pch -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: %s -Xclang -fdisable-module-hash -F %S/Inputs 2>&1 | FileCheck %s // CHECK: {{^}}Failure: AST deserialization error occurred{{$}} diff --git a/clang/test/Modules/filename.cpp b/clang/test/Modules/filename.cpp index 460b6e6b9571..e2b5ad141891 100644 --- a/clang/test/Modules/filename.cpp +++ b/clang/test/Modules/filename.cpp @@ -1,5 +1,5 @@ // RUN: cd %S -// RUN: %clang_cc1 -I. -fmodule-maps -fmodule-name=A -fmodule-map-file=%S/Inputs/filename/module.map %s -E | FileCheck %s +// RUN: %clang_cc1 -I. -fmodule-name=A -fmodule-map-file=%S/Inputs/filename/module.map %s -E | FileCheck %s #include "Inputs/filename/a.h" diff --git a/clang/test/Modules/fmodules-validate-once-per-build-session.c b/clang/test/Modules/fmodules-validate-once-per-build-session.c index dcbd0db3cbfe..dc552eaabde7 100644 --- a/clang/test/Modules/fmodules-validate-once-per-build-session.c +++ b/clang/test/Modules/fmodules-validate-once-per-build-session.c @@ -13,8 +13,8 @@ // === // Compile the module. -// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s -// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp // RUN: ls -R %t/modules-cache-user | grep Foo.pcm.timestamp // RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-before.pcm @@ -22,8 +22,8 @@ // === // Use it, and make sure that we did not recompile it. -// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s -// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp // RUN: ls -R %t/modules-cache-user | grep Foo.pcm.timestamp // RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-after.pcm @@ -39,8 +39,8 @@ // === // Use the module, and make sure that we did not recompile it if foo.h is a // system header, even though the sources changed. -// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s -// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp // RUN: ls -R %t/modules-cache-user | grep Foo.pcm.timestamp // RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-after.pcm @@ -52,7 +52,7 @@ // === // Recompile the module if the today's date is before 01 January 2030. -// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fbuild-session-timestamp=1893456000 -fmodules-validate-once-per-build-session %s +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fbuild-session-timestamp=1893456000 -fmodules-validate-once-per-build-session %s // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp // RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-after.pcm diff --git a/clang/test/Modules/global_index.m b/clang/test/Modules/global_index.m index b255b6300077..64a70f2a43ff 100644 --- a/clang/test/Modules/global_index.m +++ b/clang/test/Modules/global_index.m @@ -1,12 +1,12 @@ // RUN: rm -rf %t // Run without global module index -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fno-modules-global-index -F %S/Inputs %s -verify +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -fno-modules-global-index -F %S/Inputs %s -verify // RUN: ls %t|not grep modules.idx // Run and create the global module index -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify // RUN: ls %t|grep modules.idx // Run and use the global module index -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s // expected-no-diagnostics @import DependsOnModule; diff --git a/clang/test/Modules/header-import.m b/clang/test/Modules/header-import.m index baeb1d304dcf..f95c3bd6af67 100644 --- a/clang/test/Modules/header-import.m +++ b/clang/test/Modules/header-import.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s // expected-no-diagnostics #import "point.h" diff --git a/clang/test/Modules/ignored_macros.m b/clang/test/Modules/ignored_macros.m index 669db4ddc2da..a87a11f89c31 100644 --- a/clang/test/Modules/ignored_macros.m +++ b/clang/test/Modules/ignored_macros.m @@ -1,14 +1,14 @@ // First trial: pass -DIGNORED=1 to both. This should obviously work. // RUN: rm -rf %t.modules -// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify -// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -I %S/Inputs -include-pch %t.pch %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -fimplicit-module-maps -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -fimplicit-module-maps -I %S/Inputs -include-pch %t.pch %s -verify // Second trial: pass -DIGNORED=1 only to the second invocation. We // should detect the failure. // // RUN: rm -rf %t.modules -// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -fmodules -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify -// RUN: not %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -I %S/Inputs -include-pch %t.pch %s > %t.err 2>&1 +// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -fmodules -fimplicit-module-maps -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify +// RUN: not %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -fimplicit-module-maps -I %S/Inputs -include-pch %t.pch %s > %t.err 2>&1 // RUN: FileCheck -check-prefix=CHECK-CONFLICT %s < %t.err // CHECK-CONFLICT: PCH was compiled with module cache path @@ -16,22 +16,22 @@ // make it ignored. There should be no failure, IGNORED is defined in // the translation unit but not the module. // RUN: rm -rf %t.modules -// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -fmodules -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify -// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -I %S/Inputs -include-pch %t.pch -fmodules-ignore-macro=IGNORED %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -fmodules -fimplicit-module-maps -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -fimplicit-module-maps -I %S/Inputs -include-pch %t.pch -fmodules-ignore-macro=IGNORED %s -verify // Fourth trial: pass -DIGNORED=1 and -fmodules-ignore-macro=IGNORED // to both invocations, so modules will be built without the IGNORED // macro. // RUN: rm -rf %t.modules -// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules-ignore-macro=IGNORED -fmodules -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify -// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -I %S/Inputs -include-pch %t.pch -fmodules-ignore-macro=IGNORED -DNO_IGNORED_ANYWHERE -fmodules-ignore-macro=NO_IGNORED_ANYWHERE %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules-ignore-macro=IGNORED -fmodules -fimplicit-module-maps -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -fimplicit-module-maps -I %S/Inputs -include-pch %t.pch -fmodules-ignore-macro=IGNORED -DNO_IGNORED_ANYWHERE -fmodules-ignore-macro=NO_IGNORED_ANYWHERE %s -verify // Fifth trial: pass -DIGNORED=1 and -fmodules-ignore-macro=IGNORED=1 // to both invocations, so modules will be built without the IGNORED // macro. // RUN: rm -rf %t.modules -// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules-ignore-macro=IGNORED=1 -fmodules -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify -// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -I %S/Inputs -include-pch %t.pch -fmodules-ignore-macro=IGNORED=1 -DNO_IGNORED_ANYWHERE -fmodules-ignore-macro=NO_IGNORED_ANYWHERE %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules-ignore-macro=IGNORED=1 -fmodules -fimplicit-module-maps -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t.modules -DIGNORED=1 -fmodules -fimplicit-module-maps -I %S/Inputs -include-pch %t.pch -fmodules-ignore-macro=IGNORED=1 -DNO_IGNORED_ANYWHERE -fmodules-ignore-macro=NO_IGNORED_ANYWHERE %s -verify // expected-no-diagnostics diff --git a/clang/test/Modules/implementation-of-module.m b/clang/test/Modules/implementation-of-module.m index 818cce8c36de..37e2cfbe30fd 100644 --- a/clang/test/Modules/implementation-of-module.m +++ b/clang/test/Modules/implementation-of-module.m @@ -3,19 +3,19 @@ // CHECK-IMPL-OF-ERR: conflicting module names specified: '-fmodule-name=Bar' and '-fmodule-implementation-of Foo' // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ // RUN: -fmodule-implementation-of category_right -fsyntax-only -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ // RUN: -fmodule-implementation-of category_right -dM -E -o - 2>&1 | FileCheck %s // CHECK-NOT: __building_module -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ // RUN: -fmodule-implementation-of category_left -verify -// RUN: %clang_cc1 -x objective-c-header -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ +// RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ // RUN: -fmodule-implementation-of category_right -emit-pch -o %t.pch -// RUN: %clang_cc1 -x objective-c-header -fmodules -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ +// RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -w -Werror=auto-import %s -I %S/Inputs \ // RUN: -DWITH_PREFIX -fmodules-ignore-macro=WITH_PREFIX -include-pch %t.pch -fmodule-implementation-of category_right #ifndef WITH_PREFIX diff --git a/clang/test/Modules/import-self.m b/clang/test/Modules/import-self.m index 68be565eaf40..aa7437132372 100644 --- a/clang/test/Modules/import-self.m +++ b/clang/test/Modules/import-self.m @@ -1,9 +1,9 @@ // RUN: rm -rf %t -// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t \ +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -I %S/Inputs/submodules %s 2>&1 | FileCheck %s // CHECK: import of module 'import_self.c' appears within same top-level module 'import_self' -// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t \ +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -I %S/Inputs/submodules -fmodule-name=import_self %s \ // RUN: 2>&1 | FileCheck -check-prefix=CHECK-fmodule-name %s // CHECK-fmodule-name: import of module 'import_self.b' appears within same top-level module 'import_self' diff --git a/clang/test/Modules/include-relative.c b/clang/test/Modules/include-relative.c index 264df5f31897..84d44cb569ad 100644 --- a/clang/test/Modules/include-relative.c +++ b/clang/test/Modules/include-relative.c @@ -2,7 +2,7 @@ // RUN: mkdir %t // RUN: cp -r %S/Inputs/include-relative %t/include-relative // RUN: cd %t -// RUN: %clang_cc1 -fmodules -x c -verify -fmodules-cache-path=%t -I include-relative %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x c -verify -fmodules-cache-path=%t -I include-relative %s // expected-no-diagnostics diff --git a/clang/test/Modules/include_next.c b/clang/test/Modules/include_next.c index f2dafb4a91de..15658cb58a67 100644 --- a/clang/test/Modules/include_next.c +++ b/clang/test/Modules/include_next.c @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -I%S/Inputs/include_next/x -I%S/Inputs/include_next/y -verify %s -// RUN: %clang_cc1 -I%S/Inputs/include_next/x -I%S/Inputs/include_next/y -verify %s -fmodules -fmodules-cache-path=%t +// RUN: %clang_cc1 -I%S/Inputs/include_next/x -I%S/Inputs/include_next/y -verify %s -fmodules -fimplicit-module-maps -fmodules-cache-path=%t // expected-no-diagnostics #include "a.h" diff --git a/clang/test/Modules/incomplete-module.m b/clang/test/Modules/incomplete-module.m index 8181ae863de9..e338a40c9ab5 100644 --- a/clang/test/Modules/incomplete-module.m +++ b/clang/test/Modules/incomplete-module.m @@ -1,9 +1,9 @@ @import incomplete_mod; // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules-cache-path=%t -Wincomplete-module -fmodules -I %S/Inputs %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fmodules-cache-path=%t -Wincomplete-module -fmodules -fimplicit-module-maps -I %S/Inputs %s 2>&1 | FileCheck %s // CHECK: warning: include of non-modular header inside module 'incomplete_mod' // RUN: rm -rf %t -// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules-strict-decluse -fmodules -I %S/Inputs %s 2>&1 | FileCheck %s -check-prefix=DECLUSE +// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules-strict-decluse -fmodules -fimplicit-module-maps -I %S/Inputs %s 2>&1 | FileCheck %s -check-prefix=DECLUSE // DECLUSE: error: module incomplete_mod does not depend on a module exporting {{'.*incomplete_mod_missing.h'}} diff --git a/clang/test/Modules/inferred-attributes.mm b/clang/test/Modules/inferred-attributes.mm index 5fc1d623f396..b1bcd93ab543 100644 --- a/clang/test/Modules/inferred-attributes.mm +++ b/clang/test/Modules/inferred-attributes.mm @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -F %S/Inputs/inferred-attr -fsyntax-only -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs/inferred-attr -fsyntax-only -verify %s // expected-no-diagnostics extern "C" { @import InferredExternC; diff --git a/clang/test/Modules/inferred-framework-case.m b/clang/test/Modules/inferred-framework-case.m index e511155de9ef..2ed443f2b5a1 100644 --- a/clang/test/Modules/inferred-framework-case.m +++ b/clang/test/Modules/inferred-framework-case.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify -DA +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify -DA // FIXME: PR20299 - getCanonicalName() is not implemented on Windows. // REQUIRES: shell diff --git a/clang/test/Modules/inferred-frameworks.m b/clang/test/Modules/inferred-frameworks.m index 372e4f2a9250..838237d916b2 100644 --- a/clang/test/Modules/inferred-frameworks.m +++ b/clang/test/Modules/inferred-frameworks.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify +// RUN: %clang_cc1 -x objective-c -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify #include diff --git a/clang/test/Modules/inferred-submodules.m b/clang/test/Modules/inferred-submodules.m index f801d04a0e78..a0b7d985486e 100644 --- a/clang/test/Modules/inferred-submodules.m +++ b/clang/test/Modules/inferred-submodules.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify +// RUN: %clang_cc1 -x objective-c -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify // expected-no-diagnostics @import Module.Sub; diff --git a/clang/test/Modules/invalidate-identifiers.c b/clang/test/Modules/invalidate-identifiers.c index de3aa10db46b..c679813ab61b 100644 --- a/clang/test/Modules/invalidate-identifiers.c +++ b/clang/test/Modules/invalidate-identifiers.c @@ -1,4 +1,4 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/invalidate-identifiers -emit-llvm-only %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/invalidate-identifiers -emit-llvm-only %s #include "b.h" diff --git a/clang/test/Modules/irgen.c b/clang/test/Modules/irgen.c index c44afb1becb1..f09cc7b5388f 100644 --- a/clang/test/Modules/irgen.c +++ b/clang/test/Modules/irgen.c @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=irgen -triple x86_64-apple-darwin10 %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=irgen -triple x86_64-apple-darwin10 %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s // FIXME: When we have a syntax for modules in C, use that. @import irgen; diff --git a/clang/test/Modules/linkage-merge.cpp b/clang/test/Modules/linkage-merge.cpp index 3ac8053761bf..005206afadb3 100644 --- a/clang/test/Modules/linkage-merge.cpp +++ b/clang/test/Modules/linkage-merge.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -verify -fmodules -fmodules-cache-path=%t -I %S/Inputs %s +// RUN: %clang_cc1 -verify -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s #include "linkage-merge-bar.h" diff --git a/clang/test/Modules/linkage-merge.m b/clang/test/Modules/linkage-merge.m index 12ad32fa3d18..955eb1aa95ea 100644 --- a/clang/test/Modules/linkage-merge.m +++ b/clang/test/Modules/linkage-merge.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=linkage_merge_left %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -w %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=linkage_merge_left %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -w %s -verify // Test redeclarations of functions where the original declaration is // still hidden. diff --git a/clang/test/Modules/load-after-failure.m b/clang/test/Modules/load-after-failure.m index 38d4a3653205..73ed0e79708b 100644 --- a/clang/test/Modules/load-after-failure.m +++ b/clang/test/Modules/load-after-failure.m @@ -11,9 +11,9 @@ // RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap // RUN: echo 'module D { header "D.h" }' >> %t/module.modulemap -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %t %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %t %s -verify // RUN: echo " " >> %t/D.h -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %t %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %t %s -verify // expected-no-diagnostics diff --git a/clang/test/Modules/load_failure.c b/clang/test/Modules/load_failure.c index 8b0d202ee8b5..6e63ba2adb19 100644 --- a/clang/test/Modules/load_failure.c +++ b/clang/test/Modules/load_failure.c @@ -7,11 +7,11 @@ #endif // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map -// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s // CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found -// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DFAILURE 2> %t.out +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DFAILURE 2> %t.out // RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t.out // FIXME: Clean up diagnostic text below and give it a location diff --git a/clang/test/Modules/lookup.cpp b/clang/test/Modules/lookup.cpp index bfe0307a0b2e..e847d78b274f 100644 --- a/clang/test/Modules/lookup.cpp +++ b/clang/test/Modules/lookup.cpp @@ -24,10 +24,10 @@ void f() { } // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_left_cxx %S/Inputs/module.map -verify -// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_right_cxx %S/Inputs/module.map -verify -// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s -verify -// RUN: %clang_cc1 -fmodules -ast-print -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix=CHECK-PRINT %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_left_cxx %S/Inputs/module.map -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_right_cxx %S/Inputs/module.map -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -ast-print -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix=CHECK-PRINT %s // FIXME: When we have a syntax for modules in C++, use that. // CHECK-PRINT: int *f0(int *); diff --git a/clang/test/Modules/lookup.m b/clang/test/Modules/lookup.m index 187e8763ca63..edf70639e5cc 100644 --- a/clang/test/Modules/lookup.m +++ b/clang/test/Modules/lookup.m @@ -1,8 +1,8 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -emit-module -x objective-c -fmodule-name=lookup_left_objc %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -emit-module -x objective-c -fmodule-name=lookup_right_objc %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -verify %s -// RUN: %clang_cc1 -fmodules -ast-print -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix=CHECK-PRINT %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -emit-module -x objective-c -fmodule-name=lookup_left_objc %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -emit-module -x objective-c -fmodule-name=lookup_right_objc %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -ast-print -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix=CHECK-PRINT %s @import lookup_left_objc; @import lookup_right_objc; diff --git a/clang/test/Modules/macro-ambiguity.cpp b/clang/test/Modules/macro-ambiguity.cpp index af43b35839ab..747a80bf38ca 100644 --- a/clang/test/Modules/macro-ambiguity.cpp +++ b/clang/test/Modules/macro-ambiguity.cpp @@ -5,7 +5,7 @@ // RUN: -v \ // RUN: -iquote Inputs/macro-ambiguity/a/quote \ // RUN: -isystem Inputs/macro-ambiguity/a/system \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=a -o %t/a.pcm \ // RUN: Inputs/macro-ambiguity/module.modulemap @@ -14,7 +14,7 @@ // RUN: -v \ // RUN: -iquote Inputs/macro-ambiguity/b/quote \ // RUN: -isystem Inputs/macro-ambiguity/b/system \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=b -o %t/b.pcm \ // RUN: Inputs/macro-ambiguity/module.modulemap @@ -23,7 +23,7 @@ // RUN: -v \ // RUN: -iquote Inputs/macro-ambiguity/c/quote \ // RUN: -isystem Inputs/macro-ambiguity/c/system \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=c -o %t/c.pcm \ // RUN: Inputs/macro-ambiguity/module.modulemap @@ -32,7 +32,7 @@ // RUN: -v \ // RUN: -iquote Inputs/macro-ambiguity/d/quote \ // RUN: -isystem Inputs/macro-ambiguity/d/system \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=d -o %t/d.pcm \ // RUN: Inputs/macro-ambiguity/module.modulemap @@ -49,7 +49,7 @@ // RUN: -isystem Inputs/macro-ambiguity/d/system \ // RUN: -iquote Inputs/macro-ambiguity/e/quote \ // RUN: -isystem Inputs/macro-ambiguity/e/system \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-map-file=Inputs/macro-ambiguity/module.modulemap \ // RUN: -fmodule-file=%t/a.pcm \ @@ -70,7 +70,7 @@ // RUN: -isystem Inputs/macro-ambiguity/d/system \ // RUN: -iquote Inputs/macro-ambiguity/e/quote \ // RUN: -isystem Inputs/macro-ambiguity/e/system \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-map-file=Inputs/macro-ambiguity/module.modulemap \ // RUN: -fmodule-file=%t/a.pcm \ diff --git a/clang/test/Modules/macro-hiding.cpp b/clang/test/Modules/macro-hiding.cpp index b166f4b194cf..37402ad07748 100644 --- a/clang/test/Modules/macro-hiding.cpp +++ b/clang/test/Modules/macro-hiding.cpp @@ -1,69 +1,69 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DC1 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -DD1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -DC1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DC1 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -DD1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -DC1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -DC1 -DD1 // -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DE1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DE1 #ifdef A1 #include "a1.h" diff --git a/clang/test/Modules/macro-masking.cpp b/clang/test/Modules/macro-masking.cpp index 3d4e8e0ba49a..cd97c0769853 100644 --- a/clang/test/Modules/macro-masking.cpp +++ b/clang/test/Modules/macro-masking.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fsyntax-only -fmodules %s -fmodules-cache-path=%t -verify -I%S/Inputs/macro-masking -// RxN: %clang_cc1 -fsyntax-only -fmodules -fmodules-local-submodule-visibility %s -fmodules-cache-path=%t -verify -I%S/Inputs/macro-masking -DLOCAL_VISIBILITY +// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify -I%S/Inputs/macro-masking +// RxN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-local-submodule-visibility %s -fmodules-cache-path=%t -verify -I%S/Inputs/macro-masking -DLOCAL_VISIBILITY // expected-no-diagnostics #include "a.h" diff --git a/clang/test/Modules/macro-reexport.cpp b/clang/test/Modules/macro-reexport.cpp index 2be6f1532cb4..4e825a07bd80 100644 --- a/clang/test/Modules/macro-reexport.cpp +++ b/clang/test/Modules/macro-reexport.cpp @@ -1,21 +1,21 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -fsyntax-only -DC1 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify -// RUN: %clang_cc1 -fsyntax-only -DC1 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify +// RUN: %clang_cc1 -fsyntax-only -DC1 -I%S/Inputs/macro-reexport -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify // RUN: %clang_cc1 -fsyntax-only -DD1 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify -// RUN: %clang_cc1 -fsyntax-only -DD1 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify +// RUN: %clang_cc1 -fsyntax-only -DD1 -I%S/Inputs/macro-reexport -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify // RUN: %clang_cc1 -fsyntax-only -DD2 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify -// RUN: %clang_cc1 -fsyntax-only -DD2 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify +// RUN: %clang_cc1 -fsyntax-only -DD2 -I%S/Inputs/macro-reexport -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify // RUN: %clang_cc1 -fsyntax-only -DF1 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify -// RUN: %clang_cc1 -fsyntax-only -DF1 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify +// RUN: %clang_cc1 -fsyntax-only -DF1 -I%S/Inputs/macro-reexport -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify // // RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DC1 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify -// RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DC1 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify +// RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DC1 -I%S/Inputs/macro-reexport -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify // RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DD1 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify -// RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DD1 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify +// RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DD1 -I%S/Inputs/macro-reexport -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify // RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DD2 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify -// RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DD2 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify +// RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DD2 -I%S/Inputs/macro-reexport -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify // RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DF1 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify -// RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DF1 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify +// RUN: %clang_cc1 -fmodules-local-submodule-visibility -fsyntax-only -DF1 -I%S/Inputs/macro-reexport -fmodules -fimplicit-module-maps %s -fmodules-cache-path=%t -verify #if defined(F1) #include "f1.h" diff --git a/clang/test/Modules/macro-undef-through-pch.m b/clang/test/Modules/macro-undef-through-pch.m index 0e5e99fb8bef..fc32229bec54 100644 --- a/clang/test/Modules/macro-undef-through-pch.m +++ b/clang/test/Modules/macro-undef-through-pch.m @@ -1,8 +1,8 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c-header -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -x objective-c-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -I%S/Inputs/macro-undef-through-pch -emit-pch \ // RUN: %S/Inputs/macro-undef-through-pch/foo.h -o %t.pch -// RUN: %clang_cc1 -x objective-c -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -x objective-c -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -I%S/Inputs/macro-undef-through-pch -emit-pch \ // RUN: -include-pch %t.pch %s diff --git a/clang/test/Modules/macros.c b/clang/test/Modules/macros.c index 538d4a8d6a74..54dca191645e 100644 --- a/clang/test/Modules/macros.c +++ b/clang/test/Modules/macros.c @@ -1,8 +1,8 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s -// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s -detailed-preprocessing-record -// RUN: %clang_cc1 -fmodules -DLOCAL_VISIBILITY -fmodules-local-submodule-visibility -x objective-c++ -verify -fmodules-cache-path=%t -I %S/Inputs %s -// RUN: not %clang_cc1 -E -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix CHECK-PREPROCESSED %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s -detailed-preprocessing-record +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -DLOCAL_VISIBILITY -fmodules-local-submodule-visibility -x objective-c++ -verify -fmodules-cache-path=%t -I %S/Inputs %s +// RUN: not %clang_cc1 -E -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix CHECK-PREPROCESSED %s // FIXME: When we have a syntax for modules in C, use that. // These notes come from headers in modules, and are bogus. diff --git a/clang/test/Modules/macros2.c b/clang/test/Modules/macros2.c index 0bb801ee995b..7d669d10c290 100644 --- a/clang/test/Modules/macros2.c +++ b/clang/test/Modules/macros2.c @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s -// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -x objective-c++ -verify -fmodules-cache-path=%t -I %S/Inputs %s -DLOCAL_VISIBILITY +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-local-submodule-visibility -x objective-c++ -verify -fmodules-cache-path=%t -I %S/Inputs %s -DLOCAL_VISIBILITY // This test checks some of the same things as macros.c, but imports modules in // a different order. diff --git a/clang/test/Modules/malformed.cpp b/clang/test/Modules/malformed.cpp index 2d07c4cd0da7..7d5bcc8c9d66 100644 --- a/clang/test/Modules/malformed.cpp +++ b/clang/test/Modules/malformed.cpp @@ -3,9 +3,9 @@ // // RUN: rm -rf %t // RUN: cd %S -// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I Inputs/malformed -DHEADER="a1.h" %s 2>&1 | FileCheck %s --check-prefix=CHECK-A -// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I Inputs/malformed -DHEADER="b1.h" %s 2>&1 | FileCheck %s --check-prefix=CHECK-B -// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I Inputs/malformed -DHEADER="c.h" malformed.cpp 2>&1 | FileCheck %s --check-prefix=CHECK-C +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I Inputs/malformed -DHEADER="a1.h" %s 2>&1 | FileCheck %s --check-prefix=CHECK-A +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I Inputs/malformed -DHEADER="b1.h" %s 2>&1 | FileCheck %s --check-prefix=CHECK-B +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I Inputs/malformed -DHEADER="c.h" malformed.cpp 2>&1 | FileCheck %s --check-prefix=CHECK-C #define STR2(x) #x #define STR(x) STR2(x) diff --git a/clang/test/Modules/merge-anon-in-template.cpp b/clang/test/Modules/merge-anon-in-template.cpp index 6e4e6e09e9cd..3d0db37122d3 100644 --- a/clang/test/Modules/merge-anon-in-template.cpp +++ b/clang/test/Modules/merge-anon-in-template.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-anon-in-template -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-anon-in-template -verify %s // expected-no-diagnostics #include "a.h" #include "c.h" diff --git a/clang/test/Modules/merge-decl-context.cpp b/clang/test/Modules/merge-decl-context.cpp index 208ba9212e82..55219ed587b0 100644 --- a/clang/test/Modules/merge-decl-context.cpp +++ b/clang/test/Modules/merge-decl-context.cpp @@ -1,19 +1,19 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=b -o %t/b.pcm -fmodule-maps \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-name=b -o %t/b.pcm \ // RUN: -emit-module %S/Inputs/merge-decl-context/merge-decl-context.modulemap -I%S/Inputs \ // RUN: -I %S/Inputs/merge-decl-context -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=c -o %t/c.pcm -fmodule-maps \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-name=c -o %t/c.pcm \ // RUN: -fmodule-file=%t/b.pcm -fno-implicit-modules \ // RUN: -emit-module %S/Inputs/merge-decl-context/merge-decl-context.modulemap -I%S/Inputs \ // RUN: -I %S/Inputs/merge-decl-context -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=d -o %t/d.pcm -fmodule-maps \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-name=d -o %t/d.pcm \ // RUN: -fmodule-file=%t/b.pcm -fno-implicit-modules \ // RUN: -emit-module %S/Inputs/merge-decl-context/merge-decl-context.modulemap -I%S/Inputs \ // RUN: -I %S/Inputs/merge-decl-context // Use the two modules in a single compile. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-file=%t/c.pcm -fmodule-file=%t/b.pcm \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-file=%t/c.pcm -fmodule-file=%t/b.pcm \ // RUN: -fmodule-file=%t/d.pcm -fno-implicit-modules \ // RUN: -fmodule-map-file=%S/Inputs/merge-decl-context/merge-decl-context.modulemap -I%S/Inputs \ // RUN: -emit-llvm -o %t/test.o %s diff --git a/clang/test/Modules/merge-decl-order.cpp b/clang/test/Modules/merge-decl-order.cpp index d3b21fdf8ae5..91ec048b38c5 100644 --- a/clang/test/Modules/merge-decl-order.cpp +++ b/clang/test/Modules/merge-decl-order.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-decl-order -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-decl-order -verify %s // expected-no-diagnostics // Check that we include all decls from 'a' before the decls from 'b' in foo's diff --git a/clang/test/Modules/merge-dependent-friends.cpp b/clang/test/Modules/merge-dependent-friends.cpp index 0b0c903c318f..9dfcb19d7fd4 100644 --- a/clang/test/Modules/merge-dependent-friends.cpp +++ b/clang/test/Modules/merge-dependent-friends.cpp @@ -1,4 +1,4 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-dependent-friends -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-dependent-friends -verify %s // expected-no-diagnostics #include "d.h" diff --git a/clang/test/Modules/merge-friends.cpp b/clang/test/Modules/merge-friends.cpp index 8284bfee680a..0aff9294cbc2 100644 --- a/clang/test/Modules/merge-friends.cpp +++ b/clang/test/Modules/merge-friends.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-friends -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-friends -verify %s // expected-no-diagnostics #include "friend.h" N::foo *use; diff --git a/clang/test/Modules/merge-implicit-special-members.cpp b/clang/test/Modules/merge-implicit-special-members.cpp index a8b917cb01b9..eb1fccd87ca6 100644 --- a/clang/test/Modules/merge-implicit-special-members.cpp +++ b/clang/test/Modules/merge-implicit-special-members.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-implicit-special-members -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-implicit-special-members -verify %s // expected-no-diagnostics #include "c.h" int n = pthread_mutex_t().lock; diff --git a/clang/test/Modules/merge-name-for-linkage.cpp b/clang/test/Modules/merge-name-for-linkage.cpp index 1700b610a5c2..da1664ca343d 100644 --- a/clang/test/Modules/merge-name-for-linkage.cpp +++ b/clang/test/Modules/merge-name-for-linkage.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-name-for-linkage -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-name-for-linkage -verify %s // expected-no-diagnostics typedef union {} pthread_mutex_t; #include "a.h" diff --git a/clang/test/Modules/merge-nested-templates.cpp b/clang/test/Modules/merge-nested-templates.cpp index 42764eaed64f..3abb2bb3d976 100644 --- a/clang/test/Modules/merge-nested-templates.cpp +++ b/clang/test/Modules/merge-nested-templates.cpp @@ -1,4 +1,4 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-nested-templates -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-nested-templates -verify %s // expected-no-diagnostics #include "c.h" diff --git a/clang/test/Modules/merge-target-features.cpp b/clang/test/Modules/merge-target-features.cpp index ccf3aab3d0fa..8b82c8a9789b 100644 --- a/clang/test/Modules/merge-target-features.cpp +++ b/clang/test/Modules/merge-target-features.cpp @@ -3,7 +3,7 @@ // // RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ // RUN: -iquote Inputs/merge-target-features \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=foo -o %t/foo.pcm \ // RUN: -triple i386-unknown-unknown \ @@ -12,7 +12,7 @@ // // RUN: not %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ // RUN: -iquote Inputs/merge-target-features \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \ // RUN: -fmodule-file=%t/foo.pcm \ @@ -24,7 +24,7 @@ // // RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ // RUN: -iquote Inputs/merge-target-features \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \ // RUN: -fmodule-file=%t/foo.pcm \ @@ -36,7 +36,7 @@ // // RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ // RUN: -iquote Inputs/merge-target-features \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \ // RUN: -fmodule-file=%t/foo.pcm \ @@ -48,7 +48,7 @@ // // RUN: not %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ // RUN: -iquote Inputs/merge-target-features \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \ // RUN: -fmodule-file=%t/foo.pcm \ diff --git a/clang/test/Modules/merge-template-friend.cpp b/clang/test/Modules/merge-template-friend.cpp index 8a1910dad620..37508a6c6390 100644 --- a/clang/test/Modules/merge-template-friend.cpp +++ b/clang/test/Modules/merge-template-friend.cpp @@ -1,14 +1,14 @@ // RUN: rm -rf %t // -// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x c++ -fmodules-cache-path=%t \ // RUN: -emit-module -fmodule-name=a -o %t/a.pcm \ // RUN: %S/Inputs/merge-template-friend/module.modulemap // -// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x c++ -fmodules-cache-path=%t \ // RUN: -emit-module -fmodule-name=b -o %t/b.pcm \ // RUN: %S/Inputs/merge-template-friend/module.modulemap // -// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x c++ -fmodules-cache-path=%t \ // RUN: -I%S/Inputs/merge-template-friend \ // RUN: -fmodule-file=%t/a.pcm \ // RUN: -fmodule-file=%t/b.pcm \ diff --git a/clang/test/Modules/merge-template-members.cpp b/clang/test/Modules/merge-template-members.cpp index 1fdaa9c29be2..88f5fc6c6af1 100644 --- a/clang/test/Modules/merge-template-members.cpp +++ b/clang/test/Modules/merge-template-members.cpp @@ -1,7 +1,7 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-template-members -verify -emit-llvm-only %s -DTEST=1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-template-members -verify -emit-llvm-only %s -DTEST=2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/merge-template-members -verify -emit-llvm-only %s -DTEST=3 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-template-members -verify -emit-llvm-only %s -DTEST=1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-template-members -verify -emit-llvm-only %s -DTEST=2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/merge-template-members -verify -emit-llvm-only %s -DTEST=3 // expected-no-diagnostics #if TEST == 1 diff --git a/clang/test/Modules/merge-typedefs.cpp b/clang/test/Modules/merge-typedefs.cpp index 607f8c5ad0ec..da92a0955749 100644 --- a/clang/test/Modules/merge-typedefs.cpp +++ b/clang/test/Modules/merge-typedefs.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -x c++ -I%S/Inputs/merge-typedefs -verify %s -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x c++ -I%S/Inputs/merge-typedefs -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x c++ -I%S/Inputs/merge-typedefs -verify %s #include "b2.h" #include "a1.h" diff --git a/clang/test/Modules/merge-using-decls.cpp b/clang/test/Modules/merge-using-decls.cpp index 3b84d0e5a3a0..789f75b57400 100644 --- a/clang/test/Modules/merge-using-decls.cpp +++ b/clang/test/Modules/merge-using-decls.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x c++ -I%S/Inputs/merge-using-decls -verify %s -DORDER=1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x c++ -I%S/Inputs/merge-using-decls -verify %s -DORDER=2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x c++ -I%S/Inputs/merge-using-decls -verify %s -DORDER=1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x c++ -I%S/Inputs/merge-using-decls -verify %s -DORDER=2 #if ORDER == 1 #include "a.h" diff --git a/clang/test/Modules/merge-vtable-codegen.cpp b/clang/test/Modules/merge-vtable-codegen.cpp index 7372073891c5..3c9299c64ea5 100644 --- a/clang/test/Modules/merge-vtable-codegen.cpp +++ b/clang/test/Modules/merge-vtable-codegen.cpp @@ -1,15 +1,15 @@ // RUN: rm -rf %t // First, build two modules that both re-export the same header. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=b -o %t/b.pcm -fmodule-maps \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-name=b -o %t/b.pcm \ // RUN: -emit-module %S/Inputs/merge-vtable-codegen/merge-vtable-codegen.modulemap \ // RUN: -I %S/Inputs/merge-vtable-codegen -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=c -o %t/c.pcm -fmodule-maps \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-name=c -o %t/c.pcm \ // RUN: -emit-module %S/Inputs/merge-vtable-codegen/merge-vtable-codegen.modulemap \ // RUN: -I %S/Inputs/merge-vtable-codegen // Use the two modules in a single compile. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-file=%t/b.pcm -fmodule-file=%t/c.pcm \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-file=%t/b.pcm -fmodule-file=%t/c.pcm \ // RUN: -fmodule-map-file=%S/Inputs/merge-vtable-codegen/merge-vtable-codegen.modulemap \ // RUN: -emit-llvm -o %t/test.o %s diff --git a/clang/test/Modules/method_pool.m b/clang/test/Modules/method_pool.m index f7d5ae700c97..1d76a8404c6b 100644 --- a/clang/test/Modules/method_pool.m +++ b/clang/test/Modules/method_pool.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -I %S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs %s -verify @import MethodPoolA; diff --git a/clang/test/Modules/missing-header.m b/clang/test/Modules/missing-header.m index c2c1673ac5b0..d865078e3a2f 100644 --- a/clang/test/Modules/missing-header.m +++ b/clang/test/Modules/missing-header.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: not %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules %s 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules %s 2>&1 | FileCheck %s // FIXME: cannot use -verify, because the error from inside the module build has // a different source manager than the verifier. diff --git a/clang/test/Modules/missing-submodule.m b/clang/test/Modules/missing-submodule.m index 4f3553ce6c4b..4586ce6762f1 100644 --- a/clang/test/Modules/missing-submodule.m +++ b/clang/test/Modules/missing-submodule.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -F %S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs %s -verify #include // expected-warning{{missing submodule 'Module.NotInModule'}} int getNotInModule() { diff --git a/clang/test/Modules/modify-module.m b/clang/test/Modules/modify-module.m index 953c917cddcc..f9a70b25c877 100644 --- a/clang/test/Modules/modify-module.m +++ b/clang/test/Modules/modify-module.m @@ -6,15 +6,15 @@ // RUN: cp %S/Inputs/Modified/A.h %t/include // RUN: cp %S/Inputs/Modified/B.h %t/include // RUN: cp %S/Inputs/Modified/module.map %t/include -// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify +// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify // RUN: echo '' >> %t/include/B.h -// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify +// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify // RUN: echo 'int getA(); int getA2();' > %t/include/A.h -// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify +// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify // RUN: rm %t/cache/ModA.pcm -// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify +// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify // RUN: touch %t/cache/ModA.pcm -// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -I %t/include %s -verify +// RUN: %clang_cc1 -fdisable-module-hash -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -I %t/include %s -verify // expected-no-diagnostics diff --git a/clang/test/Modules/module-private.cpp b/clang/test/Modules/module-private.cpp index 478d36dd4d59..6e723c863ce3 100644 --- a/clang/test/Modules/module-private.cpp +++ b/clang/test/Modules/module-private.cpp @@ -1,7 +1,7 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -fmodule-name=module_private_left -emit-module %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -fmodule-name=module_private_right -emit-module %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -fmodule-name=module_private_left -emit-module %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -fmodule-name=module_private_right -emit-module %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s -verify // FIXME: When we have a syntax for modules in C++, use that. @import module_private_left; diff --git a/clang/test/Modules/module_file_info.m b/clang/test/Modules/module_file_info.m index 1b0a838bf823..01d5073650b4 100644 --- a/clang/test/Modules/module_file_info.m +++ b/clang/test/Modules/module_file_info.m @@ -2,7 +2,7 @@ @import DependsOnModule; // RUN: rm -rf %t -// RUN: %clang_cc1 -w -Wunused -fmodules -fdisable-module-hash -fmodules-cache-path=%t -F %S/Inputs -DBLARG -DWIBBLE=WOBBLE %s +// RUN: %clang_cc1 -w -Wunused -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t -F %S/Inputs -DBLARG -DWIBBLE=WOBBLE %s // RUN: %clang_cc1 -module-file-info %t/DependsOnModule.pcm | FileCheck %s // CHECK: Generated by this Clang: diff --git a/clang/test/Modules/modulemap-locations.m b/clang/test/Modules/modulemap-locations.m index 949c4786263d..3c80db582d1d 100644 --- a/clang/test/Modules/modulemap-locations.m +++ b/clang/test/Modules/modulemap-locations.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/ModuleMapLocations/Module_ModuleMap -I %S/Inputs/ModuleMapLocations/Both -F %S/Inputs/ModuleMapLocations -I %S/Inputs/ModuleMapLocations -F %S/Inputs -x objective-c -fsyntax-only %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/ModuleMapLocations/Module_ModuleMap -I %S/Inputs/ModuleMapLocations/Both -F %S/Inputs/ModuleMapLocations -I %S/Inputs/ModuleMapLocations -F %S/Inputs -x objective-c -fsyntax-only %s -verify // regular @import module_modulemap; diff --git a/clang/test/Modules/modules-with-same-name.m b/clang/test/Modules/modules-with-same-name.m index d362f756a60a..b5cb6fafb851 100644 --- a/clang/test/Modules/modules-with-same-name.m +++ b/clang/test/Modules/modules-with-same-name.m @@ -1,22 +1,22 @@ // RUN: rm -rf %t // A from path 1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/path1/A -DDIRECT -DEXPECTED_PATH=1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/path1/A -DDIRECT -DEXPECTED_PATH=1 // A from path 2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/path2/A -DDIRECT -DEXPECTED_PATH=2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/path2/A -DDIRECT -DEXPECTED_PATH=2 // Confirm that we have two pcm files (one for each 'A'). // RUN: find %t -name "A-*.pcm" | count 2 // DependsOnA, using A from path 1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -DEXPECTED_PATH=1 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -DEXPECTED_PATH=1 // Confirm that we have three pcm files (one for each 'A', and one for 'DependsOnA') // RUN: find %t -name "*.pcm" | count 3 // DependsOnA, using A from path 2 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path2/A -DEXPECTED_PATH=2 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path2/A -DEXPECTED_PATH=2 // Confirm that we still have three pcm files, since DependsOnA will be rebuilt // RUN: find %t -name "*.pcm" | count 3 diff --git a/clang/test/Modules/namespaces.cpp b/clang/test/Modules/namespaces.cpp index a6f4c25cc094..5c0e18325b0a 100644 --- a/clang/test/Modules/namespaces.cpp +++ b/clang/test/Modules/namespaces.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify int &global(int); int &global2(int); diff --git a/clang/test/Modules/no-implicit-builds.cpp b/clang/test/Modules/no-implicit-builds.cpp index d9e8fa1da1c8..bfc3562dbcf4 100644 --- a/clang/test/Modules/no-implicit-builds.cpp +++ b/clang/test/Modules/no-implicit-builds.cpp @@ -1,12 +1,12 @@ // RUN: rm -rf %t // Produce an error if a module is needed, but not found. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodule-map-file=%S/Inputs/no-implicit-builds/b.modulemap \ // RUN: -fno-implicit-modules %s -verify // Compile the module and put it into the cache. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodule-map-file=%S/Inputs/no-implicit-builds/b.modulemap \ // RUN: %s -Rmodule-build 2>&1 | FileCheck --check-prefix=CHECK-CACHE-BUILD %s // CHECK-CACHE-BUILD: {{building module 'b'}} @@ -14,19 +14,19 @@ // Produce an error if a module is found in the cache but implicit modules is off. // Note that the command line must match the command line for the first check, otherwise // this check might not find the module in the cache and trivially succeed. -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodule-map-file=%S/Inputs/no-implicit-builds/b.modulemap \ // RUN: %s -Rmodule-build -fno-implicit-modules -verify // Verify that we can still pass the module via -fmodule-file when implicit modules // are switched off: // - First, explicitly compile the module: -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=b -o %t/b.pcm \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-name=b -o %t/b.pcm \ // RUN: -emit-module %S/Inputs/no-implicit-builds/b.modulemap \ // RUN: -fno-implicit-modules // // - Next, verify that we can load it: -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-file=%t/b.pcm \ +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-file=%t/b.pcm \ // RUN: -fmodule-map-file=%S/Inputs/no-implicit-builds/b.modulemap \ // RUN: -fno-implicit-modules %s diff --git a/clang/test/Modules/no-implicit-maps.cpp b/clang/test/Modules/no-implicit-maps.cpp index cb270a05014e..ddcad5df1e6f 100644 --- a/clang/test/Modules/no-implicit-maps.cpp +++ b/clang/test/Modules/no-implicit-maps.cpp @@ -1,3 +1,3 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c -fno-modules-implicit-maps -fmodules-cache-path=%t -fmodules -I %S/Inputs/private %s -verify +// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -I %S/Inputs/private %s -verify @import libPrivate1; // expected-error {{not found}} diff --git a/clang/test/Modules/no-stale-modtime.m b/clang/test/Modules/no-stale-modtime.m index 53512126a1b6..b90daf123ef0 100644 --- a/clang/test/Modules/no-stale-modtime.m +++ b/clang/test/Modules/no-stale-modtime.m @@ -11,18 +11,18 @@ // RUN: echo 'module b { header "b.h" } module l { header "l.h" }' > %t/module.map // RUN: echo 'module r { header "r.h" } module t { header "t.h" }' >> %t/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -I %t -fsyntax-only %s -Rmodule-build 2>&1 \ // RUN: | FileCheck -check-prefix=REBUILD-ALL %s -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -I %t -fsyntax-only %s -Rmodule-build -verify // Add an identifier to ensure everything depending on t is out of date // RUN: echo 'extern int a;' >> %t/t.h -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -I %t -fsyntax-only %s -Rmodule-build 2>&1 \ // RUN: | FileCheck -check-prefix=REBUILD-ALL %s -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \ +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -I %t -fsyntax-only %s -Rmodule-build -verify // REBUILD-ALL: building module 'b' diff --git a/clang/test/Modules/normal-module-map.cpp b/clang/test/Modules/normal-module-map.cpp index 70fed60b1295..5db1f3f33e94 100644 --- a/clang/test/Modules/normal-module-map.cpp +++ b/clang/test/Modules/normal-module-map.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -I %S/Inputs/normal-module-map %s -verify +// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/normal-module-map %s -verify #include "Umbrella/umbrella_sub.h" int getUmbrella() { diff --git a/clang/test/Modules/objc-categories.m b/clang/test/Modules/objc-categories.m index a66ab8d63125..e8549fabb50e 100644 --- a/clang/test/Modules/objc-categories.m +++ b/clang/test/Modules/objc-categories.m @@ -1,10 +1,10 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c -fmodule-name=category_top -emit-module %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c -fmodule-name=category_left -emit-module %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c -fmodule-name=category_right -emit-module %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c -fmodule-name=category_bottom -emit-module %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c -fmodule-name=category_other -emit-module %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=category_top -emit-module %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=category_left -emit-module %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=category_right -emit-module %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=category_bottom -emit-module %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=category_other -emit-module %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify @import category_bottom; diff --git a/clang/test/Modules/objc_redef.m b/clang/test/Modules/objc_redef.m index 28e47665f24f..2e57f41bc662 100644 --- a/clang/test/Modules/objc_redef.m +++ b/clang/test/Modules/objc_redef.m @@ -6,8 +6,8 @@ int test(id x) { } // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=weird_objc %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=weird_objc %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify // expected-no-diagnostics diff --git a/clang/test/Modules/odr.cpp b/clang/test/Modules/odr.cpp index 4ac257cd03aa..30143968ffb2 100644 --- a/clang/test/Modules/odr.cpp +++ b/clang/test/Modules/odr.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs/odr %s -verify -std=c++11 +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/odr %s -verify -std=c++11 // expected-error@a.h:8 {{'X::n' from module 'a' is not present in definition of 'X' provided earlier}} struct X { // expected-note {{definition has no member 'n'}} diff --git a/clang/test/Modules/on-demand-build.m b/clang/test/Modules/on-demand-build.m index e95875942029..f84245c0ca78 100644 --- a/clang/test/Modules/on-demand-build.m +++ b/clang/test/Modules/on-demand-build.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s -// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s -// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s #define FOO @import Module; @interface OtherClass diff --git a/clang/test/Modules/on-demand-macros.m b/clang/test/Modules/on-demand-macros.m index 3c16fa7055f8..d179122c1b18 100644 --- a/clang/test/Modules/on-demand-macros.m +++ b/clang/test/Modules/on-demand-macros.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -F %S/Inputs -DFOO_RETURNS_INT_PTR -verify %s -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -F %S/Inputs -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs -DFOO_RETURNS_INT_PTR -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs -verify %s // expected-no-diagnostics @import CmdLine; diff --git a/clang/test/Modules/pch-used.m b/clang/test/Modules/pch-used.m index 74f21f5dac0f..cdfadb2cf966 100644 --- a/clang/test/Modules/pch-used.m +++ b/clang/test/Modules/pch-used.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %clang_cc1 -x objective-c-header -emit-pch %S/Inputs/pch-used.h -o %t/pch-used.h.pch -fmodules -fmodules-cache-path=%t/cache -O0 -isystem %S/Inputs/System/usr/include -// RUN: %clang_cc1 %s -include-pch %t/pch-used.h.pch -fmodules -fmodules-cache-path=%t/cache -O0 -isystem %S/Inputs/System/usr/include -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -x objective-c-header -emit-pch %S/Inputs/pch-used.h -o %t/pch-used.h.pch -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -O0 -isystem %S/Inputs/System/usr/include +// RUN: %clang_cc1 %s -include-pch %t/pch-used.h.pch -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -O0 -isystem %S/Inputs/System/usr/include -emit-llvm -o - | FileCheck %s void f() { SPXTrace(); } void g() { double x = DBL_MAX; } diff --git a/clang/test/Modules/pr19692.cpp b/clang/test/Modules/pr19692.cpp index 6cc515312f00..72829ad37f3d 100644 --- a/clang/test/Modules/pr19692.cpp +++ b/clang/test/Modules/pr19692.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -I%S/Inputs/pr19692 -verify %s -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/pr19692 -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/pr19692 -verify %s #include "TFoo.h" #include "stdint.h" diff --git a/clang/test/Modules/pr20399.cpp b/clang/test/Modules/pr20399.cpp index 4f4a02561fc2..4195f50204d6 100644 --- a/clang/test/Modules/pr20399.cpp +++ b/clang/test/Modules/pr20399.cpp @@ -1,2 +1,2 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodule-name=libGdml -emit-module -x c++ -std=c++11 %S/Inputs/PR20399/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodule-name=libGdml -emit-module -x c++ -std=c++11 %S/Inputs/PR20399/module.modulemap diff --git a/clang/test/Modules/pr20786.cpp b/clang/test/Modules/pr20786.cpp index 4c0426ed5e58..47e5b6c10b96 100644 --- a/clang/test/Modules/pr20786.cpp +++ b/clang/test/Modules/pr20786.cpp @@ -1,2 +1,2 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodule-name=TBranchProxy -emit-module -x c++ %S/Inputs/PR20786/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodule-name=TBranchProxy -emit-module -x c++ %S/Inputs/PR20786/module.modulemap diff --git a/clang/test/Modules/pr21687.cpp b/clang/test/Modules/pr21687.cpp index ad67489541d8..51eb47ddee88 100644 --- a/clang/test/Modules/pr21687.cpp +++ b/clang/test/Modules/pr21687.cpp @@ -1,3 +1,3 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/PR21687 -emit-llvm-only %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/PR21687 -emit-llvm-only %s #include "c.h" diff --git a/clang/test/Modules/preprocess.m b/clang/test/Modules/preprocess.m index 9b563fef821c..8d740d1de287 100644 --- a/clang/test/Modules/preprocess.m +++ b/clang/test/Modules/preprocess.m @@ -1,11 +1,11 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -include %S/Inputs/preprocess-prefix.h -E %s | FileCheck -strict-whitespace %s -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -x objective-c-header -emit-pch %S/Inputs/preprocess-prefix.h -o %t.pch -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -include-pch %t.pch -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -include %S/Inputs/preprocess-prefix.h -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -x objective-c-header -emit-pch %S/Inputs/preprocess-prefix.h -o %t.pch +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -include-pch %t.pch -E %s | FileCheck -strict-whitespace %s // -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -x objective-c++ -include %S/Inputs/preprocess-prefix.h -E %s | FileCheck -strict-whitespace %s -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -x objective-c++-header -emit-pch %S/Inputs/preprocess-prefix.h -o %t.pch -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -x objective-c++ -include-pch %t.pch -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -x objective-c++ -include %S/Inputs/preprocess-prefix.h -E %s | FileCheck -strict-whitespace %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -x objective-c++-header -emit-pch %S/Inputs/preprocess-prefix.h -o %t.pch +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -I %S/Inputs/preprocess -x objective-c++ -include-pch %t.pch -E %s | FileCheck -strict-whitespace %s #import "diamond_right.h" #import "diamond_right.h" // to check that imports get their own line #include "file.h" diff --git a/clang/test/Modules/private.cpp b/clang/test/Modules/private.cpp index 31e60e47e3d5..52812b38645f 100644 --- a/clang/test/Modules/private.cpp +++ b/clang/test/Modules/private.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -I %S/Inputs/private %s -verify -// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -I %S/Inputs/private %s -fsyntax-only -Wno-private-header +// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/private %s -verify +// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/private %s -fsyntax-only -Wno-private-header #include "common.h" @import libPrivate1; diff --git a/clang/test/Modules/private1.cpp b/clang/test/Modules/private1.cpp index 811a2333d1db..f3be826c7c11 100644 --- a/clang/test/Modules/private1.cpp +++ b/clang/test/Modules/private1.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -I %S/Inputs/private0 -I %S/Inputs/private1 -I %S/Inputs/private2 %s -verify +// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/private0 -I %S/Inputs/private1 -I %S/Inputs/private2 %s -verify #include "common.h" @import libPrivateN2; diff --git a/clang/test/Modules/prune.m b/clang/test/Modules/prune.m index 7bc771f7843d..6676407c9acd 100644 --- a/clang/test/Modules/prune.m +++ b/clang/test/Modules/prune.m @@ -11,8 +11,8 @@ // Clear out the module cache // RUN: rm -rf %t // Run Clang twice so we end up creating the timestamp file (the second time). -// RUN: %clang_cc1 -DIMPORT_DEPENDS_ON_MODULE -fmodules-ignore-macro=DIMPORT_DEPENDS_ON_MODULE -fmodules -F %S/Inputs -fmodules-cache-path=%t %s -verify -// RUN: %clang_cc1 -DIMPORT_DEPENDS_ON_MODULE -fmodules-ignore-macro=DIMPORT_DEPENDS_ON_MODULE -fmodules -F %S/Inputs -fmodules-cache-path=%t %s -verify +// RUN: %clang_cc1 -DIMPORT_DEPENDS_ON_MODULE -fmodules-ignore-macro=DIMPORT_DEPENDS_ON_MODULE -fmodules -fimplicit-module-maps -F %S/Inputs -fmodules-cache-path=%t %s -verify +// RUN: %clang_cc1 -DIMPORT_DEPENDS_ON_MODULE -fmodules-ignore-macro=DIMPORT_DEPENDS_ON_MODULE -fmodules -fimplicit-module-maps -F %S/Inputs -fmodules-cache-path=%t %s -verify // RUN: ls %t | grep modules.timestamp // RUN: ls -R %t | grep ^Module.*pcm // RUN: ls -R %t | grep DependsOnModule.*pcm @@ -20,7 +20,7 @@ // Set the timestamp back more than two days. We should try to prune, // but nothing gets pruned because the module files are new enough. // RUN: touch -m -a -t 201101010000 %t/modules.timestamp -// RUN: %clang_cc1 -fmodules -F %S/Inputs -fmodules-cache-path=%t -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600 %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -F %S/Inputs -fmodules-cache-path=%t -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600 %s -verify // RUN: ls %t | grep modules.timestamp // RUN: ls -R %t | grep ^Module.*pcm // RUN: ls -R %t | grep DependsOnModule.*pcm @@ -29,7 +29,7 @@ // This shouldn't prune anything, because the timestamp has been updated, so // the pruning mechanism won't fire. // RUN: find %t -name DependsOnModule*.pcm | xargs touch -a -t 201101010000 -// RUN: %clang_cc1 -fmodules -F %S/Inputs -fmodules-cache-path=%t -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600 %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -F %S/Inputs -fmodules-cache-path=%t -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600 %s -verify // RUN: ls %t | grep modules.timestamp // RUN: ls -R %t | grep ^Module.*pcm // RUN: ls -R %t | grep DependsOnModule.*pcm @@ -38,7 +38,7 @@ // This should trigger pruning, which will remove DependsOnModule but not Module. // RUN: touch -m -a -t 201101010000 %t/modules.timestamp // RUN: find %t -name DependsOnModule*.pcm | xargs touch -a -t 201101010000 -// RUN: %clang_cc1 -fmodules -F %S/Inputs -fmodules-cache-path=%t -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600 %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -F %S/Inputs -fmodules-cache-path=%t -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600 %s -verify // RUN: ls %t | grep modules.timestamp // RUN: ls -R %t | grep ^Module.*pcm // RUN: ls -R %t | not grep DependsOnModule.*pcm diff --git a/clang/test/Modules/rebuild.m b/clang/test/Modules/rebuild.m index 4d4d05529e7d..40f2d47e09e8 100644 --- a/clang/test/Modules/rebuild.m +++ b/clang/test/Modules/rebuild.m @@ -1,19 +1,19 @@ // RUN: rm -rf %t // Build Module and set its timestamp -// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c - +// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c - // RUN: touch -m -a -t 201101010000 %t/Module.pcm // RUN: cp %t/Module.pcm %t/Module.pcm.saved // RUN: wc -c %t/Module.pcm > %t/Module.size.saved // Build DependsOnModule -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s // RUN: diff %t/Module.pcm %t/Module.pcm.saved // RUN: cp %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved // Rebuild Module, reset its timestamp, and verify its size hasn't changed // RUN: rm %t/Module.pcm -// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c - +// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c - // RUN: touch -m -a -t 201101010000 %t/Module.pcm // RUN: wc -c %t/Module.pcm > %t/Module.size // RUN: diff %t/Module.size %t/Module.size.saved @@ -21,13 +21,13 @@ // But the signature at least is expected to change, so we rebuild DependsOnModule. // NOTE: if we change how the signature is created, this test may need updating. -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s // RUN: diff %t/Module.pcm %t/Module.pcm.saved.2 // RUN: not diff %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved // Rebuild Module, reset its timestamp, and verify its size hasn't changed // RUN: rm %t/Module.pcm -// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c - +// RUN: echo '@import Module;' | %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs -x objective-c - // RUN: touch -m -a -t 201101010000 %t/Module.pcm // RUN: wc -c %t/Module.pcm > %t/Module.size // RUN: diff %t/Module.size %t/Module.size.saved @@ -35,7 +35,7 @@ // Verify again with Module pre-imported. // NOTE: if we change how the signature is created, this test may need updating. -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash -fsyntax-only -F %S/Inputs %s // RUN: diff %t/Module.pcm %t/Module.pcm.saved.2 // RUN: not diff %t/DependsOnModule.pcm %t/DependsOnModule.pcm.saved diff --git a/clang/test/Modules/recursive.c b/clang/test/Modules/recursive.c index 5315b10522b4..9c03a6ac4548 100644 --- a/clang/test/Modules/recursive.c +++ b/clang/test/Modules/recursive.c @@ -1,9 +1,9 @@ // RUN: rm -rf %t -// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s 2>&1 | FileCheck %s #include "recursive1.h" // RUN: rm -rf %t -// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=recursive1 %S/Inputs/module.map 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=recursive1 %S/Inputs/module.map 2>&1 | FileCheck %s // CHECK: While building module 'recursive1'{{( imported from .*[/\]recursive.c:3)?}}: // CHECK-NEXT: While building module 'recursive2' imported from {{.*Inputs[/\]}}recursive1.h:1: diff --git a/clang/test/Modules/recursive_visibility.mm b/clang/test/Modules/recursive_visibility.mm index f37410aa44e1..12894f3366e8 100644 --- a/clang/test/Modules/recursive_visibility.mm +++ b/clang/test/Modules/recursive_visibility.mm @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 // expected-no-diagnostics diff --git a/clang/test/Modules/redecl-add-after-load.cpp b/clang/test/Modules/redecl-add-after-load.cpp index 8ca70ad9580b..f888460f297e 100644 --- a/clang/test/Modules/redecl-add-after-load.cpp +++ b/clang/test/Modules/redecl-add-after-load.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -// RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -DIMPORT_DECLS +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -DIMPORT_DECLS // expected-no-diagnostics diff --git a/clang/test/Modules/redecl-found-building-chains.cpp b/clang/test/Modules/redecl-found-building-chains.cpp index 1173863cebad..91524fba0cfd 100644 --- a/clang/test/Modules/redecl-found-building-chains.cpp +++ b/clang/test/Modules/redecl-found-building-chains.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/redecl-found-building-chains -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/redecl-found-building-chains -verify %s // expected-no-diagnostics int n, m; #include "d.h" diff --git a/clang/test/Modules/redecl-merge.m b/clang/test/Modules/redecl-merge.m index 37e5967f4e3b..59a19af7ff06 100644 --- a/clang/test/Modules/redecl-merge.m +++ b/clang/test/Modules/redecl-merge.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -Wreturn-type -fmodules-cache-path=%t -I %S/Inputs %s -verify -Wno-objc-root-class +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -Wreturn-type -fmodules-cache-path=%t -I %S/Inputs %s -verify -Wno-objc-root-class @class C2; @class C3; diff --git a/clang/test/Modules/redecl-merge2.m b/clang/test/Modules/redecl-merge2.m index 3431ecc90b39..dfa9c12d697a 100644 --- a/clang/test/Modules/redecl-merge2.m +++ b/clang/test/Modules/redecl-merge2.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -Wno-objc-root-class +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify -Wno-objc-root-class // expected-no-diagnostics @import redecl_merge_bottom.prefix; diff --git a/clang/test/Modules/redecl-namespaces.mm b/clang/test/Modules/redecl-namespaces.mm index 203daa9a2bb0..e17af86feba8 100644 --- a/clang/test/Modules/redecl-namespaces.mm +++ b/clang/test/Modules/redecl-namespaces.mm @@ -8,6 +8,6 @@ void test() { } // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -emit-module -fmodule-name=redecl_namespaces_left %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -emit-module -fmodule-name=redecl_namespaces_right %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -w %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -emit-module -fmodule-name=redecl_namespaces_left %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -emit-module -fmodule-name=redecl_namespaces_right %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -w %s -verify diff --git a/clang/test/Modules/redecl-templates.cpp b/clang/test/Modules/redecl-templates.cpp index 6bbec02f1056..ee42dc9c6a84 100644 --- a/clang/test/Modules/redecl-templates.cpp +++ b/clang/test/Modules/redecl-templates.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -x c++ -I %S/Inputs/redecl-templates %s -verify -std=c++14 -// RUN: %clang_cc1 -x c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs/redecl-templates %s -verify -std=c++14 +// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/redecl-templates %s -verify -std=c++14 // expected-no-diagnostics template struct A {}; diff --git a/clang/test/Modules/redeclarations.m b/clang/test/Modules/redeclarations.m index 11aca7597830..e3f78f28d75c 100644 --- a/clang/test/Modules/redeclarations.m +++ b/clang/test/Modules/redeclarations.m @@ -5,8 +5,8 @@ @end // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_right %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_right %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify // expected-no-diagnostics diff --git a/clang/test/Modules/redecls.m b/clang/test/Modules/redecls.m index fa643b90ac8a..d6ad22e609ea 100644 --- a/clang/test/Modules/redecls.m +++ b/clang/test/Modules/redecls.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t.mcp -// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t1.pch -fmodules-cache-path=%t.mcp -I %S/Inputs/redecls -// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t2.pch -include-pch %t1.pch -fmodules-cache-path=%t.mcp -I %S/Inputs/redecls -// RUN: %clang_cc1 -fmodules %s -fsyntax-only -include-pch %t2.pch -I %S/Inputs/redecls -fmodules-cache-path=%t.mcp -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps %s -emit-pch -o %t1.pch -fmodules-cache-path=%t.mcp -I %S/Inputs/redecls +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps %s -emit-pch -o %t2.pch -include-pch %t1.pch -fmodules-cache-path=%t.mcp -I %S/Inputs/redecls +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps %s -fsyntax-only -include-pch %t2.pch -I %S/Inputs/redecls -fmodules-cache-path=%t.mcp -verify #ifndef HEADER1 #define HEADER1 diff --git a/clang/test/Modules/renamed.m b/clang/test/Modules/renamed.m index ec2616e9a724..46a8f942fe83 100644 --- a/clang/test/Modules/renamed.m +++ b/clang/test/Modules/renamed.m @@ -3,6 +3,6 @@ int f() { return same_api; } // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -I %S/Inputs/oldname -fmodules-cache-path=%t %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -I %S/Inputs/oldname -fmodules-cache-path=%t %s -verify // expected-no-diagnostics diff --git a/clang/test/Modules/require-modular-includes.m b/clang/test/Modules/require-modular-includes.m index 302e4cd191cd..0254444bf59b 100644 --- a/clang/test/Modules/require-modular-includes.m +++ b/clang/test/Modules/require-modular-includes.m @@ -2,80 +2,80 @@ // Including a header from the imported module // RUN: echo '@import FromImportedModuleOK;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -Werror -fsyntax-only -x objective-c - // Including a non-modular header // RUN: echo '@import FromImportedModuleFail;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -I %S/Inputs/require-modular-includes \ // RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s // Including a header from a subframework // RUN: echo '@import FromSubframework;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -Werror -fsyntax-only -x objective-c - // Including a header from a subframework (fail) // RUN: echo '@import FromNonModularSubframework;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -I %S/Inputs/require-modular-includes \ // RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s // Including a non-modular header from a submodule // RUN: echo '@import FromImportedSubModule;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -I %S/Inputs/require-modular-includes \ // RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s // Including a non-modular header (directly) with -fmodule-name set // RUN: echo '#include "NotInModule.h"' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \ // RUN: -Werror -fmodule-name=A -fsyntax-only -x objective-c - // Including an excluded header // RUN: echo '@import IncludeExcluded;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -Werror -fsyntax-only -x objective-c - // Including a header from another module // RUN: echo '@import FromAnotherModule;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -I %S/Inputs/require-modular-includes \ // RUN: -Werror -fsyntax-only -x objective-c - // Including an excluded header from another module // RUN: echo '@import ExcludedFromAnotherModule;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -I %S/Inputs/require-modular-includes \ // RUN: -Werror -fsyntax-only -x objective-c - // Including a header from an umbrella directory // RUN: echo '@import FromUmbrella;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -I %S/Inputs/require-modular-includes \ // RUN: -Werror -fsyntax-only -x objective-c - // A includes B includes non-modular C // RUN: echo '@import A;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \ // RUN: -I %S/Inputs/require-modular-includes \ // RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s // Non-framework module (pass) // RUN: echo '@import NotFramework;' | \ -// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \ +// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \ // RUN: -Werror -fsyntax-only -x objective-c - diff --git a/clang/test/Modules/requires.m b/clang/test/Modules/requires.m index ff0ddfeb3359..155c6aec5dc4 100644 --- a/clang/test/Modules/requires.m +++ b/clang/test/Modules/requires.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify -fmodule-feature custom_req1 +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify -fmodule-feature custom_req1 @import DependsOnModule.CXX; // expected-error{{module 'DependsOnModule.CXX' requires feature 'cplusplus'}} @import DependsOnModule.NotCXX; diff --git a/clang/test/Modules/requires.mm b/clang/test/Modules/requires.mm index 736f2fab646a..cc64a500bd57 100644 --- a/clang/test/Modules/requires.mm +++ b/clang/test/Modules/requires.mm @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify @import DependsOnModule.CXX; @import DependsOnModule.NotCXX; // expected-error{{module 'DependsOnModule.NotCXX' is incompatible with feature 'cplusplus'}} diff --git a/clang/test/Modules/resolution-change.m b/clang/test/Modules/resolution-change.m index 6882fe44c5cb..bf95104968a3 100644 --- a/clang/test/Modules/resolution-change.m +++ b/clang/test/Modules/resolution-change.m @@ -1,24 +1,24 @@ // RUN: rm -rf %t // Build PCH using A from path 1 -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -emit-pch -o %t-A.pch %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -emit-pch -o %t-A.pch %s // Use the PCH with the same header search options; should be fine -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -include-pch %t-A.pch %s -fsyntax-only -Werror +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -include-pch %t-A.pch %s -fsyntax-only -Werror // Different -W options are ok -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -include-pch %t-A.pch %s -fsyntax-only -Werror -Wauto-import +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -include-pch %t-A.pch %s -fsyntax-only -Werror -Wauto-import // Use the PCH with no way to resolve DependsOnA -// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -include-pch %t-A.pch %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-NODOA %s +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -include-pch %t-A.pch %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-NODOA %s // CHECK-NODOA: module 'DependsOnA' in AST file '{{.*DependsOnA.*pcm}}' (imported by AST file '{{.*A.pch}}') is not defined in any loaded module map // Use the PCH with no way to resolve A -// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -include-pch %t-A.pch %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-NOA %s +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -include-pch %t-A.pch %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-NOA %s // CHECK-NOA: module 'A' in AST file '{{.*A.*pcm}}' (imported by AST file '{{.*DependsOnA.*pcm}}') is not defined in any loaded module map // Use the PCH and have it resolve to the other A -// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path2/A -include-pch %t-A.pch %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-WRONGA %s +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path2/A -include-pch %t-A.pch %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-WRONGA %s // CHECK-WRONGA: module 'A' was built in directory '{{.*Inputs.modules-with-same-name.path1.A}}' but now resides in directory '{{.*Inputs.modules-with-same-name.path2.A}}' #ifndef HEADER diff --git a/clang/test/Modules/stddef.c b/clang/test/Modules/stddef.c index aefc90f9a117..16de854563fc 100644 --- a/clang/test/Modules/stddef.c +++ b/clang/test/Modules/stddef.c @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/StdDef %s -verify -fno-modules-error-recovery +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/StdDef %s -verify -fno-modules-error-recovery #include "ptrdiff_t.h" diff --git a/clang/test/Modules/stddef.m b/clang/test/Modules/stddef.m index 83f73f9d33ab..9af526e5d562 100644 --- a/clang/test/Modules/stddef.m +++ b/clang/test/Modules/stddef.m @@ -3,5 +3,5 @@ size_t getSize(); // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/StdDef %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/StdDef %s -verify // expected-no-diagnostics diff --git a/clang/test/Modules/stress1.cpp b/clang/test/Modules/stress1.cpp index df690aa7e657..4f3c34ab640b 100644 --- a/clang/test/Modules/stress1.cpp +++ b/clang/test/Modules/stress1.cpp @@ -3,14 +3,14 @@ // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=m00 -o %t/m00.pcm \ // RUN: Inputs/stress1/module.modulemap // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=m00 -o %t/m00_check.pcm \ // RUN: Inputs/stress1/module.modulemap @@ -19,14 +19,14 @@ // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 -fdelayed-template-parsing \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=m01 -o %t/m01.pcm \ // RUN: Inputs/stress1/module.modulemap // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 -fdelayed-template-parsing \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=m01 -o %t/m01_check.pcm \ // RUN: Inputs/stress1/module.modulemap @@ -35,21 +35,21 @@ // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=m02 -o %t/m02.pcm \ // RUN: Inputs/stress1/module.modulemap // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -emit-module -fmodule-name=m03 -o %t/m03.pcm \ // RUN: Inputs/stress1/module.modulemap // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-file=%t/m00.pcm \ // RUN: -fmodule-file=%t/m01.pcm \ @@ -60,7 +60,7 @@ // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-file=%t/m00.pcm \ // RUN: -fmodule-file=%t/m01.pcm \ @@ -73,7 +73,7 @@ // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-map-file=Inputs/stress1/module.modulemap \ // RUN: -fmodule-file=%t/m00.pcm \ @@ -85,7 +85,7 @@ // // RUN: %clang_cc1 -fmodules -x c++ -std=c++11 \ // RUN: -I Inputs/stress1 \ -// RUN: -fno-implicit-modules -fno-modules-implicit-maps \ +// RUN: -fno-implicit-modules \ // RUN: -fmodule-map-file-home-is-cwd \ // RUN: -fmodule-map-file=Inputs/stress1/module.modulemap \ // RUN: -fmodule-file=%t/m00.pcm \ diff --git a/clang/test/Modules/strict-decluse.cpp b/clang/test/Modules/strict-decluse.cpp index fa6955aef0d6..a8b5248b8516 100644 --- a/clang/test/Modules/strict-decluse.cpp +++ b/clang/test/Modules/strict-decluse.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify +// RUN: %clang_cc1 -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify #include "g.h" #include "e.h" diff --git a/clang/test/Modules/string_names.cpp b/clang/test/Modules/string_names.cpp index ed65aa8a6703..43068f13c012 100644 --- a/clang/test/Modules/string_names.cpp +++ b/clang/test/Modules/string_names.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fmodules-decluse -I %S/Inputs/string_names %s -fmodule-name="my/module-a" -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -fmodules-decluse -I %S/Inputs/string_names %s -fmodule-name="my/module-a" -verify #include "a.h" #include "b.h" // expected-error {{does not depend on a module exporting}} diff --git a/clang/test/Modules/subframework-from-intermediate-path.m b/clang/test/Modules/subframework-from-intermediate-path.m index ae0bd64e394a..394cc45f2f60 100644 --- a/clang/test/Modules/subframework-from-intermediate-path.m +++ b/clang/test/Modules/subframework-from-intermediate-path.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify @import DependsOnModule; @import SubFramework; // expected-error{{module 'SubFramework' not found}} diff --git a/clang/test/Modules/subframeworks.m b/clang/test/Modules/subframeworks.m index 5d70bc0840d5..21081843d78c 100644 --- a/clang/test/Modules/subframeworks.m +++ b/clang/test/Modules/subframeworks.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify -// RUN: %clang_cc1 -x objective-c++ -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify +// RUN: %clang_cc1 -x objective-c++ -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify @import DependsOnModule; diff --git a/clang/test/Modules/submodule-visibility-cycles.cpp b/clang/test/Modules/submodule-visibility-cycles.cpp index fca8df9f77ee..f26f6f21eea6 100644 --- a/clang/test/Modules/submodule-visibility-cycles.cpp +++ b/clang/test/Modules/submodule-visibility-cycles.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fno-modules-error-recovery -fmodules-local-submodule-visibility -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fno-modules-error-recovery -fmodules-local-submodule-visibility -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s #include "cycle1.h" C1 c1; diff --git a/clang/test/Modules/submodule-visibility.cpp b/clang/test/Modules/submodule-visibility.cpp index 07be1c2d0c34..084f811f231f 100644 --- a/clang/test/Modules/submodule-visibility.cpp +++ b/clang/test/Modules/submodule-visibility.cpp @@ -1,8 +1,8 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s -DALLOW_NAME_LEAKAGE -// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s -DIMPORT -// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fmodules-cache-path=%t -fmodule-name=x -I%S/Inputs/submodule-visibility -verify %s -// RUN: %clang_cc1 -fmodule-maps -fmodules-local-submodule-visibility -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s -DALLOW_NAME_LEAKAGE +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-local-submodule-visibility -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s -DIMPORT +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-local-submodule-visibility -fmodules-cache-path=%t -fmodule-name=x -I%S/Inputs/submodule-visibility -verify %s +// RUN: %clang_cc1 -fimplicit-module-maps -fmodules-local-submodule-visibility -fmodules-cache-path=%t -I%S/Inputs/submodule-visibility -verify %s #include "a.h" #include "b.h" diff --git a/clang/test/Modules/submodules-merge-defs.cpp b/clang/test/Modules/submodules-merge-defs.cpp index 52b12ef850af..cbe2dcdf562e 100644 --- a/clang/test/Modules/submodules-merge-defs.cpp +++ b/clang/test/Modules/submodules-merge-defs.cpp @@ -1,10 +1,10 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -DTEXTUAL -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -DTEXTUAL -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodule-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -DTEXTUAL -DEARLY_INDIRECT_INCLUDE -// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -fmodule-feature use_defs_twice -DIMPORT_USE_2 +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -DTEXTUAL +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -DTEXTUAL +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -DTEXTUAL -DEARLY_INDIRECT_INCLUDE +// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules-merge-defs %s -verify -fno-modules-error-recovery -fmodules-local-submodule-visibility -fmodule-feature use_defs_twice -DIMPORT_USE_2 // Trigger import of definitions, but don't make them visible. #include "empty.h" diff --git a/clang/test/Modules/submodules-preprocess.cpp b/clang/test/Modules/submodules-preprocess.cpp index 7040b5111b76..c9fad10d5e51 100644 --- a/clang/test/Modules/submodules-preprocess.cpp +++ b/clang/test/Modules/submodules-preprocess.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -x objective-c++ -Eonly -fmodules-cache-path=%t -I %S/Inputs/submodules %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -Eonly -fmodules-cache-path=%t -I %S/Inputs/submodules %s -verify // FIXME: When we have a syntax for modules in C++, use that. @import std.vector; diff --git a/clang/test/Modules/submodules.cpp b/clang/test/Modules/submodules.cpp index c3b2623016a8..a3dde23cb5b5 100644 --- a/clang/test/Modules/submodules.cpp +++ b/clang/test/Modules/submodules.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules %s -verify +// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/submodules %s -verify // FIXME: When we have a syntax for modules in C++, use that. @import std.vector; diff --git a/clang/test/Modules/submodules.m b/clang/test/Modules/submodules.m index 7187e75f0dc5..04e758d3353a 100644 --- a/clang/test/Modules/submodules.m +++ b/clang/test/Modules/submodules.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify +// RUN: %clang_cc1 -Wauto-import -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify // expected-no-diagnostics // Note: transitively imports Module.Sub2. diff --git a/clang/test/Modules/system_headers.m b/clang/test/Modules/system_headers.m index 8adc7e857699..165e8e866401 100644 --- a/clang/test/Modules/system_headers.m +++ b/clang/test/Modules/system_headers.m @@ -1,7 +1,7 @@ // Test that system-headerness works for building modules. // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -isystem %S/Inputs -pedantic -Werror %s -verify -std=c11 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -isystem %S/Inputs -pedantic -Werror %s -verify -std=c11 // expected-no-diagnostics @import warning; diff --git a/clang/test/Modules/system_version.m b/clang/test/Modules/system_version.m index 55174ef1506c..b1bc3609272e 100644 --- a/clang/test/Modules/system_version.m +++ b/clang/test/Modules/system_version.m @@ -9,21 +9,21 @@ // RUN: cp %S/Inputs/Modified/module.map %t/usr/include // Run once with no system version file. We should end up with one module. -// RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -isysroot %t -I %t/usr/include %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -isysroot %t -I %t/usr/include %s -verify // RUN: ls -R %t | grep -c "ModA.*pcm" | grep 1 // Add a system version file and run again. We should now have two // module variants. // RUN: mkdir -p %t/System/Library/CoreServices // RUN: echo "hello" > %t/System/Library/CoreServices/SystemVersion.plist -// RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -isysroot %t -I %t/usr/include %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -isysroot %t -I %t/usr/include %s -verify // RUN: ls -R %t | grep -c "ModA.*pcm" | grep 2 // Change the system version file and run again. We should now have three // module variants. // RUN: mkdir -p %t/System/Library/CoreServices // RUN: echo "modules" > %t/System/Library/CoreServices/SystemVersion.plist -// RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -isysroot %t -I %t/usr/include %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -fimplicit-module-maps -isysroot %t -I %t/usr/include %s -verify // RUN: ls -R %t | grep -c "ModA.*pcm" | grep 3 // expected-no-diagnostics diff --git a/clang/test/Modules/template-default-args.cpp b/clang/test/Modules/template-default-args.cpp index 99f5c6f0590a..b25b8f6eca01 100644 --- a/clang/test/Modules/template-default-args.cpp +++ b/clang/test/Modules/template-default-args.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs/template-default-args -std=c++11 %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs/template-default-args -std=c++11 %s template struct A; template struct B; diff --git a/clang/test/Modules/template-specialization-visibility.cpp b/clang/test/Modules/template-specialization-visibility.cpp index efcfd93dd88b..6f4f6efc9edc 100644 --- a/clang/test/Modules/template-specialization-visibility.cpp +++ b/clang/test/Modules/template-specialization-visibility.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs/template-specialization-visibility -std=c++11 %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs/template-specialization-visibility -std=c++11 %s // // expected-no-diagnostics diff --git a/clang/test/Modules/templates-2.mm b/clang/test/Modules/templates-2.mm index 8a752f761335..78d203ab42b4 100644 --- a/clang/test/Modules/templates-2.mm +++ b/clang/test/Modules/templates-2.mm @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs -verify %s -Wno-objc-root-class -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs -emit-llvm %s -o - -Wno-objc-root-class | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -verify %s -Wno-objc-root-class +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -emit-llvm %s -o - -Wno-objc-root-class | FileCheck %s // expected-no-diagnostics @import templates_top; diff --git a/clang/test/Modules/templates.mm b/clang/test/Modules/templates.mm index aafe0186c3ec..503f4bb459e0 100644 --- a/clang/test/Modules/templates.mm +++ b/clang/test/Modules/templates.mm @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs -verify %s -Wno-objc-root-class -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs -emit-llvm %s -o - -Wno-objc-root-class | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -verify %s -Wno-objc-root-class +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -emit-llvm %s -o - -Wno-objc-root-class | FileCheck %s // expected-no-diagnostics @import templates_left; diff --git a/clang/test/Modules/textual-headers.cpp b/clang/test/Modules/textual-headers.cpp index cab9991e3291..4df741cfe4a3 100644 --- a/clang/test/Modules/textual-headers.cpp +++ b/clang/test/Modules/textual-headers.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify -fno-modules-error-recovery +// RUN: %clang_cc1 -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify -fno-modules-error-recovery #define GIMME_A_K #include "k.h" diff --git a/clang/test/Modules/undefined-type-fixit1.cpp b/clang/test/Modules/undefined-type-fixit1.cpp index 78ce174f5462..3b7345710726 100644 --- a/clang/test/Modules/undefined-type-fixit1.cpp +++ b/clang/test/Modules/undefined-type-fixit1.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fmodules-search-all -I %S/Inputs/undefined-type-fixit %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -fmodules-search-all -I %S/Inputs/undefined-type-fixit %s -verify //#include "public1.h" #include "public2.h" diff --git a/clang/test/Modules/unnecessary-module-map-parsing.c b/clang/test/Modules/unnecessary-module-map-parsing.c index 4c83448179e0..9dfd36cb30d5 100644 --- a/clang/test/Modules/unnecessary-module-map-parsing.c +++ b/clang/test/Modules/unnecessary-module-map-parsing.c @@ -1,6 +1,6 @@ // This checks that we are not parsing module maps if modules are not enabled. -// RUN: not %clang_cc1 -fmodules -I %S/Inputs/unnecessary-module-map-parsing -fsyntax-only %s 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -I %S/Inputs/unnecessary-module-map-parsing -fsyntax-only %s 2>&1 | FileCheck %s // RUN: %clang_cc1 -I %S/Inputs/unnecessary-module-map-parsing -fsyntax-only %s // CHECK: error: expected umbrella, header, submodule, or module export diff --git a/clang/test/Modules/update-after-load.cpp b/clang/test/Modules/update-after-load.cpp index f497ea47945b..621674cf680f 100644 --- a/clang/test/Modules/update-after-load.cpp +++ b/clang/test/Modules/update-after-load.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -I %S/Inputs/update-after-load -verify -fmodules-cache-path=%t %s +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -I %S/Inputs/update-after-load -verify -fmodules-cache-path=%t %s // expected-no-diagnostics #include "a.h" diff --git a/clang/test/Modules/update-exception-spec.cpp b/clang/test/Modules/update-exception-spec.cpp index bccdddc9c09b..f678f6e76ecc 100644 --- a/clang/test/Modules/update-exception-spec.cpp +++ b/clang/test/Modules/update-exception-spec.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -fmodules -fmodules-cache-path=%t -I%S/Inputs/update-exception-spec -emit-llvm-only %s +// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/update-exception-spec -emit-llvm-only %s #include "a.h" void use(B *p); #include "c.h" diff --git a/clang/test/Modules/using-decl.cpp b/clang/test/Modules/using-decl.cpp index 4432738f060a..a388a5b7e711 100644 --- a/clang/test/Modules/using-decl.cpp +++ b/clang/test/Modules/using-decl.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify +// RUN: %clang_cc1 -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify @import using_decl.a; diff --git a/clang/test/Modules/va_list.m b/clang/test/Modules/va_list.m index 5a305180fcfa..d13b39b48f4a 100644 --- a/clang/test/Modules/va_list.m +++ b/clang/test/Modules/va_list.m @@ -1,22 +1,22 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodules-ignore-macro=PREFIX -DPREFIX -I %S/Inputs/va_list \ // RUN: -x objective-c-header %s -o %t.pch -emit-pch // Include the pch, as a sanity check. -// RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodules-ignore-macro=PREFIX -I %S/Inputs/va_list -include-pch %t.pch \ // RUN: -x objective-c %s -fsyntax-only // Repeat the previous emit-pch, but not we will have a global module index. // For some reason, this results in an identifier for __va_list_tag being // emitted into the pch. -// RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodules-ignore-macro=PREFIX -DPREFIX -I %S/Inputs/va_list \ // RUN: -x objective-c-header %s -o %t.pch -emit-pch // Include the pch, which now has __va_list_tag in it, which needs to be merged. -// RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fmodules-cache-path=%t \ +// RUN: %clang_cc1 -triple x86_64-apple-macosx10 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ // RUN: -fmodules-ignore-macro=PREFIX -I %S/Inputs/va_list -include-pch %t.pch \ // RUN: -x objective-c %s -fsyntax-only diff --git a/clang/test/Modules/validate-system-headers.m b/clang/test/Modules/validate-system-headers.m index 8cdc886322bd..d05fae777bb1 100644 --- a/clang/test/Modules/validate-system-headers.m +++ b/clang/test/Modules/validate-system-headers.m @@ -5,37 +5,37 @@ //// // Build a module using a system header -// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s +// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s // RUN: cp %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved //// // Modify the system header, and confirm that we don't notice without -fmodules-validate-system-headers. // The pcm file in the cache should fail to validate. // RUN: echo ' ' >> %t/Inputs/usr/include/foo.h -// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s +// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s // RUN: diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved //// // Now make sure we rebuild the module when -fmodules-validate-system-headers is set. -// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fmodules-validate-system-headers -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s +// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fimplicit-module-maps -fmodules-validate-system-headers -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s // RUN: not diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved //// // This should override -fmodules-validate-once-per-build-session // RUN: cp %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved -// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session +// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session // RUN: diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved // Modify the system header... // RUN: echo ' ' >> %t/Inputs/usr/include/foo.h // Don't recompile due to -fmodules-validate-once-per-build-session -// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session +// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session // RUN: diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved // Now add -fmodules-validate-system-headers and rebuild -// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fmodules-validate-system-headers -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session +// RUN: %clang_cc1 -isystem %t/Inputs/usr/include -fmodules -fimplicit-module-maps -fmodules-validate-system-headers -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session // RUN: not diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved @import Foo; diff --git a/clang/test/Modules/warn-unused-local-typedef.cpp b/clang/test/Modules/warn-unused-local-typedef.cpp index 030a52de4647..b6c006b321bd 100644 --- a/clang/test/Modules/warn-unused-local-typedef.cpp +++ b/clang/test/Modules/warn-unused-local-typedef.cpp @@ -1,7 +1,7 @@ // XFAIL: hexagon // RUN: rm -rf %t -// RUN: %clang -Wunused-local-typedef -c -x objective-c++ -fcxx-modules -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=CHECK_1 -// RUN: %clang -Wunused-local-typedef -c -x objective-c++ -fcxx-modules -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=CHECK_2 -allow-empty +// RUN: %clang_cc1 -Wunused-local-typedef -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -fsyntax-only 2>&1 | FileCheck %s -check-prefix=CHECK_1 +// RUN: %clang_cc1 -Wunused-local-typedef -x objective-c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -fsyntax-only 2>&1 | FileCheck %s -check-prefix=CHECK_2 --allow-empty // For modules, the warning should only fire the first time, when the module is // built. diff --git a/clang/test/Modules/wildcard-submodule-exports.cpp b/clang/test/Modules/wildcard-submodule-exports.cpp index f377dbecde86..321d930435d8 100644 --- a/clang/test/Modules/wildcard-submodule-exports.cpp +++ b/clang/test/Modules/wildcard-submodule-exports.cpp @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -I %S/Inputs/wildcard-submodule-exports %s -verify +// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/wildcard-submodule-exports %s -verify // FIXME: When we have a syntax for modules in C++, use that. @import C.One;