diff --git a/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp b/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp index f12441061c198..9cdc57ec01f32 100644 --- a/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp +++ b/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp @@ -1917,14 +1917,14 @@ TEST_F(SymbolCollectorTest, UndefOfModuleMacro) { #undef X )cpp"; TU.AdditionalFiles["foo.h"] = "#define X 1"; - TU.AdditionalFiles["module.map"] = R"cpp( + TU.AdditionalFiles["module.modulemap"] = R"cpp( module foo { header "foo.h" export * } )cpp"; TU.ExtraArgs.push_back("-fmodules"); - TU.ExtraArgs.push_back("-fmodule-map-file=" + testPath("module.map")); + TU.ExtraArgs.push_back("-fmodule-map-file=" + testPath("module.modulemap")); TU.OverlayRealFileSystemForModules = true; TU.build(); diff --git a/clang-tools-extra/docs/modularize.rst b/clang-tools-extra/docs/modularize.rst index 9dde467ec3084..64ca8c99d4e8e 100644 --- a/clang-tools-extra/docs/modularize.rst +++ b/clang-tools-extra/docs/modularize.rst @@ -20,7 +20,7 @@ map. :program:`modularize` also has an assistant mode option for generating a module map file based on the provided header list. The generated file is a functional module map that can be used as a starting point for a -module.map file. +module.modulemap file. Getting Started =============== diff --git a/clang-tools-extra/include-cleaner/test/Inputs/modules/module.map b/clang-tools-extra/include-cleaner/test/Inputs/modules/module.modulemap similarity index 100% rename from clang-tools-extra/include-cleaner/test/Inputs/modules/module.map rename to clang-tools-extra/include-cleaner/test/Inputs/modules/module.modulemap diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp index daa9c048279e0..f3e7dfc20b027 100644 --- a/clang-tools-extra/modularize/Modularize.cpp +++ b/clang-tools-extra/modularize/Modularize.cpp @@ -51,20 +51,20 @@ // to the header list file directory. Use -prefix to specify a // different directory. // -module-map-path=(module map) -// Skip the checks, and instead act as a module.map generation +// Skip the checks, and instead act as a module.modulemap generation // assistant, generating a module map file based on the header list. // An optional "-root-module=(rootName)" argument can specify a root -// module to be created in the generated module.map file. Note that -// you will likely need to edit this file to suit the needs of your -// headers. +// module to be created in the generated module.modulemap file. Note +// that you will likely need to edit this file to suit the needs of +// your headers. // -problem-files-list=(problem files list file name) // For use only with module map assistant. Input list of files that // have problems with respect to modules. These will still be // included in the generated module map, but will be marked as // "excluded" headers. // -root-module=(root module name) -// Specifies a root module to be created in the generated module.map -// file. +// Specifies a root module to be created in the generated +// module.modulemap file. // -block-check-header-list-only // Only warn if #include directives are inside extern or namespace // blocks if the included header is in the header list. diff --git a/clang-tools-extra/modularize/ModularizeUtilities.cpp b/clang-tools-extra/modularize/ModularizeUtilities.cpp index 089f52f52ec4d..e65f711249e3f 100644 --- a/clang-tools-extra/modularize/ModularizeUtilities.cpp +++ b/clang-tools-extra/modularize/ModularizeUtilities.cpp @@ -103,10 +103,10 @@ std::error_code ModularizeUtilities::loadAllHeaderListsAndDependencies() { // Do coverage checks. // For each loaded module map, do header coverage check. -// Starting from the directory of the module.map file, +// Starting from the directory of the module.modulemap file, // Find all header files, optionally looking only at files // covered by the include path options, and compare against -// the headers referenced by the module.map file. +// the headers referenced by the module.modulemap file. // Display warnings for unaccounted-for header files. // Returns 0 if there were no errors or warnings, 1 if there // were warnings, 2 if any other problem, such as a bad diff --git a/clang-tools-extra/modularize/ModularizeUtilities.h b/clang-tools-extra/modularize/ModularizeUtilities.h index 6da15e42f1f1e..64675022dad76 100644 --- a/clang-tools-extra/modularize/ModularizeUtilities.h +++ b/clang-tools-extra/modularize/ModularizeUtilities.h @@ -89,10 +89,10 @@ class ModularizeUtilities { /// Do coverage checks. /// For each loaded module map, do header coverage check. - /// Starting from the directory of the module.map file, + /// Starting from the directory of the module.modulemap file, /// Find all header files, optionally looking only at files /// covered by the include path options, and compare against - /// the headers referenced by the module.map file. + /// the headers referenced by the module.modulemap file. /// Display warnings for unaccounted-for header files. /// \param IncludePaths The include paths to check for files. /// (Note that other directories above these paths are ignored. diff --git a/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap b/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap index fbb8e7db4d10c..64180adf5beb3 100644 --- a/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap +++ b/clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap @@ -1,4 +1,4 @@ -// module.map +// module.modulemap module Level1A { header "Level1A.h" diff --git a/clang-tools-extra/test/modularize/Inputs/CoverageNoProblems/module.modulemap b/clang-tools-extra/test/modularize/Inputs/CoverageNoProblems/module.modulemap index d2b0957b76e1c..39af7d5dcf366 100644 --- a/clang-tools-extra/test/modularize/Inputs/CoverageNoProblems/module.modulemap +++ b/clang-tools-extra/test/modularize/Inputs/CoverageNoProblems/module.modulemap @@ -1,4 +1,4 @@ -// module.map +// module.modulemap module Level1A { header "Includes1/Level1A.h" diff --git a/clang-tools-extra/test/modularize/Inputs/CoverageProblems/module.modulemap b/clang-tools-extra/test/modularize/Inputs/CoverageProblems/module.modulemap index dbe0bb8507cf0..2b8b23054a019 100644 --- a/clang-tools-extra/test/modularize/Inputs/CoverageProblems/module.modulemap +++ b/clang-tools-extra/test/modularize/Inputs/CoverageProblems/module.modulemap @@ -1,4 +1,4 @@ -// module.map +// module.modulemap module Level1A { header "Level1A.h" diff --git a/clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap b/clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap index daa06fca78d26..9acb4923f9ac3 100644 --- a/clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap +++ b/clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap @@ -1,4 +1,4 @@ -// module.map +// module.modulemap module Level1A { header "Level1A.h" diff --git a/clang-tools-extra/test/pp-trace/Inputs/module.map b/clang-tools-extra/test/pp-trace/Inputs/module.modulemap similarity index 84% rename from clang-tools-extra/test/pp-trace/Inputs/module.map rename to clang-tools-extra/test/pp-trace/Inputs/module.modulemap index 31f33c5bb1490..f16bbc6e2e05b 100644 --- a/clang-tools-extra/test/pp-trace/Inputs/module.map +++ b/clang-tools-extra/test/pp-trace/Inputs/module.modulemap @@ -1,4 +1,4 @@ -// module.map +// module.modulemap module Level1A { header "Level1A.h" diff --git a/clang/include/clang-c/BuildSystem.h b/clang/include/clang-c/BuildSystem.h index 296e61247cef5..57e16af20a700 100644 --- a/clang/include/clang-c/BuildSystem.h +++ b/clang/include/clang-c/BuildSystem.h @@ -95,7 +95,7 @@ CINDEX_LINKAGE void clang_free(void *buffer); CINDEX_LINKAGE void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay); /** - * Object encapsulating information about a module.map file. + * Object encapsulating information about a module.modulemap file. */ typedef struct CXModuleMapDescriptorImpl *CXModuleMapDescriptor; @@ -109,7 +109,7 @@ CINDEX_LINKAGE CXModuleMapDescriptor clang_ModuleMapDescriptor_create(unsigned options); /** - * Sets the framework module name that the module.map describes. + * Sets the framework module name that the module.modulemap describes. * \returns 0 for success, non-zero to indicate an error. */ CINDEX_LINKAGE enum CXErrorCode @@ -117,7 +117,7 @@ clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor, const char *name); /** - * Sets the umbrella header name that the module.map describes. + * Sets the umbrella header name that the module.modulemap describes. * \returns 0 for success, non-zero to indicate an error. */ CINDEX_LINKAGE enum CXErrorCode diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td index caee2dc6daadb..80b5680b94f6c 100644 --- a/clang/include/clang/Basic/DiagnosticGroups.td +++ b/clang/include/clang/Basic/DiagnosticGroups.td @@ -40,6 +40,7 @@ def : DiagGroup<"auto-import">; def FrameworkHdrQuotedInclude : DiagGroup<"quoted-include-in-framework-header">; def FrameworkIncludePrivateFromPublic : DiagGroup<"framework-include-private-from-public">; +def DeprecatedModuleDotMap : DiagGroup<"deprecated-module-dot-map">; def FrameworkHdrAtImport : DiagGroup<"atimport-in-framework-header">; def CXX14BinaryLiteral : DiagGroup<"c++14-binary-literal">; def CXXPre14CompatBinaryLiteral : DiagGroup<"c++98-c++11-compat-binary-literal">; diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td index 564ca48cc32ac..75ca2fa16d348 100644 --- a/clang/include/clang/Basic/DiagnosticLexKinds.td +++ b/clang/include/clang/Basic/DiagnosticLexKinds.td @@ -884,6 +884,9 @@ def warn_quoted_include_in_framework_header : Warning< def warn_framework_include_private_from_public : Warning< "public framework header includes private framework header '%0'" >, InGroup; +def warn_deprecated_module_dot_map : Warning< + "'%0' as a module map name is deprecated, rename it to %select{module.modulemap|module.private.modulemap}1%select{| in the 'Modules' directory of the framework}2">, + InGroup; def remark_pp_include_directive_modular_translation : Remark< "treating #%select{include|import|include_next|__include_macros}0 as an " diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index c03cf19688d96..bf619bb1bb830 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -1656,7 +1656,8 @@ bool HeaderSearch::findUsableModuleForFrameworkHeader( } static OptionalFileEntryRef getPrivateModuleMap(FileEntryRef File, - FileManager &FileMgr) { + FileManager &FileMgr, + DiagnosticsEngine &Diags) { StringRef Filename = llvm::sys::path::filename(File.getName()); SmallString<128> PrivateFilename(File.getDir().getName()); if (Filename == "module.map") @@ -1665,7 +1666,14 @@ static OptionalFileEntryRef getPrivateModuleMap(FileEntryRef File, llvm::sys::path::append(PrivateFilename, "module.private.modulemap"); else return std::nullopt; - return FileMgr.getOptionalFileRef(PrivateFilename); + auto PMMFile = FileMgr.getOptionalFileRef(PrivateFilename); + if (PMMFile) { + if (Filename == "module.map") + Diags.Report(diag::warn_deprecated_module_dot_map) + << PrivateFilename << 1 + << File.getDir().getName().endswith(".framework"); + } + return PMMFile; } bool HeaderSearch::loadModuleMapFile(FileEntryRef File, bool IsSystem, @@ -1731,7 +1739,8 @@ HeaderSearch::loadModuleMapFileImpl(FileEntryRef File, bool IsSystem, } // Try to load a corresponding private module map. - if (OptionalFileEntryRef PMMFile = getPrivateModuleMap(File, FileMgr)) { + if (OptionalFileEntryRef PMMFile = + getPrivateModuleMap(File, FileMgr, Diags)) { if (ModMap.parseModuleMapFile(*PMMFile, IsSystem, Dir)) { LoadedModuleMaps[File] = false; return LMM_InvalidModuleMap; @@ -1755,11 +1764,14 @@ HeaderSearch::lookupModuleMapFile(DirectoryEntryRef Dir, bool IsFramework) { if (auto F = FileMgr.getOptionalFileRef(ModuleMapFileName)) return *F; - // Continue to allow module.map + // Continue to allow module.map, but warn it's deprecated. ModuleMapFileName = Dir.getName(); llvm::sys::path::append(ModuleMapFileName, "module.map"); - if (auto F = FileMgr.getOptionalFileRef(ModuleMapFileName)) + if (auto F = FileMgr.getOptionalFileRef(ModuleMapFileName)) { + Diags.Report(diag::warn_deprecated_module_dot_map) + << ModuleMapFileName << 0 << IsFramework; return *F; + } // For frameworks, allow to have a private module map with a preferred // spelling when a public module map is absent. diff --git a/clang/test/ARCMT/Inputs/module.map b/clang/test/ARCMT/Inputs/module.modulemap similarity index 100% rename from clang/test/ARCMT/Inputs/module.map rename to clang/test/ARCMT/Inputs/module.modulemap diff --git a/clang/test/Index/Inputs/Frameworks/module.map b/clang/test/Index/Inputs/Frameworks/module.modulemap similarity index 100% rename from clang/test/Index/Inputs/Frameworks/module.map rename to clang/test/Index/Inputs/Frameworks/module.modulemap diff --git a/clang/test/Index/Inputs/Headers/module.map b/clang/test/Index/Inputs/Headers/module.modulemap similarity index 100% rename from clang/test/Index/Inputs/Headers/module.map rename to clang/test/Index/Inputs/Headers/module.modulemap diff --git a/clang/test/Index/Inputs/Headers/nested/module.map b/clang/test/Index/Inputs/Headers/nested/module.modulemap similarity index 100% rename from clang/test/Index/Inputs/Headers/nested/module.map rename to clang/test/Index/Inputs/Headers/nested/module.modulemap diff --git a/clang/test/Index/Inputs/module.map b/clang/test/Index/Inputs/module.modulemap similarity index 100% rename from clang/test/Index/Inputs/module.map rename to clang/test/Index/Inputs/module.modulemap diff --git a/clang/test/Index/Inputs/vfsoverlay.yaml b/clang/test/Index/Inputs/vfsoverlay.yaml index 95b00bef7d0e4..3e9718b4c4314 100644 --- a/clang/test/Index/Inputs/vfsoverlay.yaml +++ b/clang/test/Index/Inputs/vfsoverlay.yaml @@ -3,8 +3,8 @@ 'roots': [ { 'name': 'OUT_DIR', 'type': 'directory', 'contents': [ - { 'name': 'module.map', 'type': 'file', - 'external-contents': 'INPUT_DIR/module.map' + { 'name': 'module.modulemap', 'type': 'file', + 'external-contents': 'INPUT_DIR/module.modulemap' }, { 'name': 'ModuleNeedsVFS.h', 'type': 'file', 'external-contents': 'INPUT_DIR/module_needs_vfs.h' diff --git a/clang/test/Modules/Inputs/Conflicts/module.map b/clang/test/Modules/Inputs/Conflicts/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/Conflicts/module.map rename to clang/test/Modules/Inputs/Conflicts/module.modulemap diff --git a/clang/test/Modules/Inputs/DependsOnModule.framework/module.map b/clang/test/Modules/Inputs/DependsOnModule.framework/Modules/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/DependsOnModule.framework/module.map rename to clang/test/Modules/Inputs/DependsOnModule.framework/Modules/module.modulemap diff --git a/clang/test/Modules/Inputs/DependsOnModule.framework/module_private.map b/clang/test/Modules/Inputs/DependsOnModule.framework/Modules/module.private.modulemap similarity index 100% rename from clang/test/Modules/Inputs/DependsOnModule.framework/module_private.map rename to clang/test/Modules/Inputs/DependsOnModule.framework/Modules/module.private.modulemap diff --git a/clang/test/Modules/Inputs/GNUAsm/NeedsGNUInlineAsm.framework/module.map b/clang/test/Modules/Inputs/GNUAsm/NeedsGNUInlineAsm.framework/Modules/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/GNUAsm/NeedsGNUInlineAsm.framework/module.map rename to clang/test/Modules/Inputs/GNUAsm/NeedsGNUInlineAsm.framework/Modules/module.modulemap diff --git a/clang/test/Modules/Inputs/Modified/module.map b/clang/test/Modules/Inputs/Modified/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/Modified/module.map rename to clang/test/Modules/Inputs/Modified/module.modulemap diff --git a/clang/test/Modules/Inputs/ModuleDiags/module.map b/clang/test/Modules/Inputs/ModuleDiags/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/ModuleDiags/module.map rename to clang/test/Modules/Inputs/ModuleDiags/module.modulemap diff --git a/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/a.h b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/a.h new file mode 100644 index 0000000000000..d571c6e4f799f --- /dev/null +++ b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/a.h @@ -0,0 +1 @@ +void will_be_found1(void); diff --git a/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/module.map b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/module.map new file mode 100644 index 0000000000000..ef46443cedc92 --- /dev/null +++ b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/module.map @@ -0,0 +1,3 @@ +module module_map { + header "a.h" +} diff --git a/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/module_private.map b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/module_private.map new file mode 100644 index 0000000000000..d542172a1235e --- /dev/null +++ b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/module_private.map @@ -0,0 +1,3 @@ +module module_map.Private { + header "private.h" +} diff --git a/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/private.h b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map/private.h new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/Headers/a.h b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/Headers/a.h new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/PrivateHeaders/private.h b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/PrivateHeaders/private.h new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/module.map b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/module.map new file mode 100644 index 0000000000000..f30545f8a88cd --- /dev/null +++ b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/module.map @@ -0,0 +1,3 @@ +framework module Module_Map_F { + header "a.h" +} diff --git a/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/module_private.map b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/module_private.map new file mode 100644 index 0000000000000..0b3b5a78b8741 --- /dev/null +++ b/clang/test/Modules/Inputs/ModuleMapLocations/Module_Map_F.framework/module_private.map @@ -0,0 +1,3 @@ +explicit framework module Module_Map_F.Private { + header "private.h" +} diff --git a/clang/test/Modules/Inputs/NoUmbrella.framework/module.map b/clang/test/Modules/Inputs/NoUmbrella.framework/Modules/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/NoUmbrella.framework/module.map rename to clang/test/Modules/Inputs/NoUmbrella.framework/Modules/module.modulemap diff --git a/clang/test/Modules/Inputs/NoUmbrella.framework/module_private.map b/clang/test/Modules/Inputs/NoUmbrella.framework/Modules/module.private.modulemap similarity index 100% rename from clang/test/Modules/Inputs/NoUmbrella.framework/module_private.map rename to clang/test/Modules/Inputs/NoUmbrella.framework/Modules/module.private.modulemap diff --git a/clang/test/Modules/Inputs/StdDef/module.map b/clang/test/Modules/Inputs/StdDef/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/StdDef/module.map rename to clang/test/Modules/Inputs/StdDef/module.modulemap diff --git a/clang/test/Modules/Inputs/System/usr/include/module.map b/clang/test/Modules/Inputs/System/usr/include/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/System/usr/include/module.map rename to clang/test/Modules/Inputs/System/usr/include/module.modulemap diff --git a/clang/test/Modules/Inputs/UseAfterFree/module.map b/clang/test/Modules/Inputs/UseAfterFree/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/UseAfterFree/module.map rename to clang/test/Modules/Inputs/UseAfterFree/module.modulemap diff --git a/clang/test/Modules/Inputs/UseAfterFree/module_private.map b/clang/test/Modules/Inputs/UseAfterFree/module.private.modulemap similarity index 100% rename from clang/test/Modules/Inputs/UseAfterFree/module_private.map rename to clang/test/Modules/Inputs/UseAfterFree/module.private.modulemap diff --git a/clang/test/Modules/Inputs/crash-recovery/usr/include/module.map b/clang/test/Modules/Inputs/crash-recovery/usr/include/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/crash-recovery/usr/include/module.map rename to clang/test/Modules/Inputs/crash-recovery/usr/include/module.modulemap diff --git a/clang/test/Modules/Inputs/declare-use/module.map b/clang/test/Modules/Inputs/declare-use/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/declare-use/module.map rename to clang/test/Modules/Inputs/declare-use/module.modulemap diff --git a/clang/test/Modules/Inputs/elsewhere/module.map b/clang/test/Modules/Inputs/elsewhere/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/elsewhere/module.map rename to clang/test/Modules/Inputs/elsewhere/module.modulemap diff --git a/clang/test/Modules/Inputs/exclude-header/module.map b/clang/test/Modules/Inputs/exclude-header/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/exclude-header/module.map rename to clang/test/Modules/Inputs/exclude-header/module.modulemap diff --git a/clang/test/Modules/Inputs/implicit-private-without-public/DeprecatedModuleMapLocation.framework/module_private.map b/clang/test/Modules/Inputs/implicit-private-without-public/DeprecatedModuleMapLocation.framework/module.private.modulemap similarity index 100% rename from clang/test/Modules/Inputs/implicit-private-without-public/DeprecatedModuleMapLocation.framework/module_private.map rename to clang/test/Modules/Inputs/implicit-private-without-public/DeprecatedModuleMapLocation.framework/module.private.modulemap diff --git a/clang/test/Modules/Inputs/include-relative/module.map b/clang/test/Modules/Inputs/include-relative/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/include-relative/module.map rename to clang/test/Modules/Inputs/include-relative/module.modulemap diff --git a/clang/test/Modules/Inputs/lookup-assert-protocol/module.map b/clang/test/Modules/Inputs/lookup-assert-protocol/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/lookup-assert-protocol/module.map rename to clang/test/Modules/Inputs/lookup-assert-protocol/module.modulemap diff --git a/clang/test/Modules/Inputs/lookup-assert/module.map b/clang/test/Modules/Inputs/lookup-assert/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/lookup-assert/module.map rename to clang/test/Modules/Inputs/lookup-assert/module.modulemap diff --git a/clang/test/Modules/Inputs/macro-undef-through-pch/module.map b/clang/test/Modules/Inputs/macro-undef-through-pch/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/macro-undef-through-pch/module.map rename to clang/test/Modules/Inputs/macro-undef-through-pch/module.modulemap diff --git a/clang/test/Modules/Inputs/malformed/module.map b/clang/test/Modules/Inputs/malformed/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/malformed/module.map rename to clang/test/Modules/Inputs/malformed/module.modulemap diff --git a/clang/test/Modules/Inputs/module.map b/clang/test/Modules/Inputs/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/module.map rename to clang/test/Modules/Inputs/module.modulemap diff --git a/clang/test/Modules/Inputs/ms-enums/module.map b/clang/test/Modules/Inputs/ms-enums/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/ms-enums/module.map rename to clang/test/Modules/Inputs/ms-enums/module.modulemap diff --git a/clang/test/Modules/Inputs/normal-module-map/Umbrella/module.map b/clang/test/Modules/Inputs/normal-module-map/Umbrella/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/normal-module-map/Umbrella/module.map rename to clang/test/Modules/Inputs/normal-module-map/Umbrella/module.modulemap diff --git a/clang/test/Modules/Inputs/normal-module-map/Umbrella2/module.map b/clang/test/Modules/Inputs/normal-module-map/Umbrella2/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/normal-module-map/Umbrella2/module.map rename to clang/test/Modules/Inputs/normal-module-map/Umbrella2/module.modulemap diff --git a/clang/test/Modules/Inputs/normal-module-map/module.map b/clang/test/Modules/Inputs/normal-module-map/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/normal-module-map/module.map rename to clang/test/Modules/Inputs/normal-module-map/module.modulemap diff --git a/clang/test/Modules/Inputs/normal-module-map/nested/module.map b/clang/test/Modules/Inputs/normal-module-map/nested/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/normal-module-map/nested/module.map rename to clang/test/Modules/Inputs/normal-module-map/nested/module.modulemap diff --git a/clang/test/Modules/Inputs/objc-category-2/module.map b/clang/test/Modules/Inputs/objc-category-2/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/objc-category-2/module.map rename to clang/test/Modules/Inputs/objc-category-2/module.modulemap diff --git a/clang/test/Modules/Inputs/objc-category-3/module.map b/clang/test/Modules/Inputs/objc-category-3/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/objc-category-3/module.map rename to clang/test/Modules/Inputs/objc-category-3/module.modulemap diff --git a/clang/test/Modules/Inputs/objc-category/module.map b/clang/test/Modules/Inputs/objc-category/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/objc-category/module.map rename to clang/test/Modules/Inputs/objc-category/module.modulemap diff --git a/clang/test/Modules/Inputs/objc-hidden/System/module.map b/clang/test/Modules/Inputs/objc-hidden/System/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/objc-hidden/System/module.map rename to clang/test/Modules/Inputs/objc-hidden/System/module.modulemap diff --git a/clang/test/Modules/Inputs/odr/module.map b/clang/test/Modules/Inputs/odr/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/odr/module.map rename to clang/test/Modules/Inputs/odr/module.modulemap diff --git a/clang/test/Modules/Inputs/oldname/module.map b/clang/test/Modules/Inputs/oldname/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/oldname/module.map rename to clang/test/Modules/Inputs/oldname/module.modulemap diff --git a/clang/test/Modules/Inputs/pr19692/module.map b/clang/test/Modules/Inputs/pr19692/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/pr19692/module.map rename to clang/test/Modules/Inputs/pr19692/module.modulemap diff --git a/clang/test/Modules/Inputs/private/module.map b/clang/test/Modules/Inputs/private/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/private/module.map rename to clang/test/Modules/Inputs/private/module.modulemap diff --git a/clang/test/Modules/Inputs/private1/module.map b/clang/test/Modules/Inputs/private1/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/private1/module.map rename to clang/test/Modules/Inputs/private1/module.modulemap diff --git a/clang/test/Modules/Inputs/private2/module.map b/clang/test/Modules/Inputs/private2/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/private2/module.map rename to clang/test/Modules/Inputs/private2/module.modulemap diff --git a/clang/test/Modules/Inputs/redecls/module.map b/clang/test/Modules/Inputs/redecls/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/redecls/module.map rename to clang/test/Modules/Inputs/redecls/module.modulemap diff --git a/clang/test/Modules/Inputs/self-import-header/af.framework/module.map b/clang/test/Modules/Inputs/self-import-header/af.framework/Modules/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/self-import-header/af.framework/module.map rename to clang/test/Modules/Inputs/self-import-header/af.framework/Modules/module.modulemap diff --git a/clang/test/Modules/Inputs/self-import-header/depend_builtin/module.map b/clang/test/Modules/Inputs/self-import-header/depend_builtin/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/self-import-header/depend_builtin/module.map rename to clang/test/Modules/Inputs/self-import-header/depend_builtin/module.modulemap diff --git a/clang/test/Modules/Inputs/string_names/module.map b/clang/test/Modules/Inputs/string_names/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/string_names/module.map rename to clang/test/Modules/Inputs/string_names/module.modulemap diff --git a/clang/test/Modules/Inputs/subdir/module.map b/clang/test/Modules/Inputs/subdir/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/subdir/module.map rename to clang/test/Modules/Inputs/subdir/module.modulemap diff --git a/clang/test/Modules/Inputs/subdirectory-module-maps-working-dir/subdir_module/module.map b/clang/test/Modules/Inputs/subdirectory-module-maps-working-dir/subdir_module/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/subdirectory-module-maps-working-dir/subdir_module/module.map rename to clang/test/Modules/Inputs/subdirectory-module-maps-working-dir/subdir_module/module.modulemap diff --git a/clang/test/Modules/Inputs/submodules/module.map b/clang/test/Modules/Inputs/submodules/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/submodules/module.map rename to clang/test/Modules/Inputs/submodules/module.modulemap diff --git a/clang/test/Modules/Inputs/system-out-of-date/module.map b/clang/test/Modules/Inputs/system-out-of-date/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/system-out-of-date/module.map rename to clang/test/Modules/Inputs/system-out-of-date/module.modulemap diff --git a/clang/test/Modules/Inputs/template-specialization-visibility/module.map b/clang/test/Modules/Inputs/template-specialization-visibility/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/template-specialization-visibility/module.map rename to clang/test/Modules/Inputs/template-specialization-visibility/module.modulemap diff --git a/clang/test/Modules/Inputs/thread-safety/module.map b/clang/test/Modules/Inputs/thread-safety/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/thread-safety/module.map rename to clang/test/Modules/Inputs/thread-safety/module.modulemap diff --git a/clang/test/Modules/Inputs/undefined-type-fixit/module.map b/clang/test/Modules/Inputs/undefined-type-fixit/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/undefined-type-fixit/module.map rename to clang/test/Modules/Inputs/undefined-type-fixit/module.modulemap diff --git a/clang/test/Modules/Inputs/unnecessary-module-map-parsing/module.map b/clang/test/Modules/Inputs/unnecessary-module-map-parsing/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/unnecessary-module-map-parsing/module.map rename to clang/test/Modules/Inputs/unnecessary-module-map-parsing/module.modulemap diff --git a/clang/test/Modules/Inputs/update-after-load/module.map b/clang/test/Modules/Inputs/update-after-load/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/update-after-load/module.map rename to clang/test/Modules/Inputs/update-after-load/module.modulemap diff --git a/clang/test/Modules/Inputs/wildcard-submodule-exports/module.map b/clang/test/Modules/Inputs/wildcard-submodule-exports/module.modulemap similarity index 100% rename from clang/test/Modules/Inputs/wildcard-submodule-exports/module.map rename to clang/test/Modules/Inputs/wildcard-submodule-exports/module.modulemap diff --git a/clang/test/Modules/concept_differ.cpp b/clang/test/Modules/concept_differ.cpp index 23c7d4c5ecf9a..9c1d292f29274 100644 --- a/clang/test/Modules/concept_differ.cpp +++ b/clang/test/Modules/concept_differ.cpp @@ -2,9 +2,9 @@ // RUN: mkdir %t // RUN: split-file %s %t // -// RUN: %clang_cc1 -x c++ -std=c++20 -fmodules -fmodules-cache-path=%t -fmodule-map-file=%t/module.map %t/foo.cpp -verify +// RUN: %clang_cc1 -x c++ -std=c++20 -fmodules -fmodules-cache-path=%t -fmodule-map-file=%t/module.modulemap %t/foo.cpp -verify -//--- module.map +//--- module.modulemap module "foo" { export * header "foo.h" diff --git a/clang/test/Modules/config_macros.m b/clang/test/Modules/config_macros.m index dd071993809be..15e2c16606ba2 100644 --- a/clang/test/Modules/config_macros.m +++ b/clang/test/Modules/config_macros.m @@ -23,6 +23,6 @@ @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 -std=c99 -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 -std=c99 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -DWANT_FOO=1 -emit-module -fmodule-name=config %S/Inputs/module.modulemap // RUN: %clang_cc1 -std=c99 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -DWANT_FOO=1 %s -verify diff --git a/clang/test/Modules/crash-vfs-ivfsoverlay.m b/clang/test/Modules/crash-vfs-ivfsoverlay.m index d2d2ccbd2546b..32489457d7362 100644 --- a/clang/test/Modules/crash-vfs-ivfsoverlay.m +++ b/clang/test/Modules/crash-vfs-ivfsoverlay.m @@ -41,5 +41,5 @@ // CHECKYAML: 'contents': [ // CHECKYAML-NEXT: { // CHECKYAML-NEXT: 'type': 'file', -// CHECKYAML-NEXT: 'name': "module.map", +// CHECKYAML-NEXT: 'name': "module.modulemap", // CHECKYAML-NEXT: 'external-contents': "/[[OTHERPATH:.*]]/actual_module2.map" diff --git a/clang/test/Modules/crash-vfs-path-symlink-component.m b/clang/test/Modules/crash-vfs-path-symlink-component.m index 8280cd79bbc21..fe6e4d6ff4245 100644 --- a/clang/test/Modules/crash-vfs-path-symlink-component.m +++ b/clang/test/Modules/crash-vfs-path-symlink-component.m @@ -49,8 +49,8 @@ // CHECKYAML-NEXT: 'contents': [ // CHECKYAML-NEXT: { // CHECKYAML-NEXT: 'type': 'file', -// CHECKYAML-NEXT: 'name': "module.map", -// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/i/usr/include/module.map" +// CHECKYAML-NEXT: 'name': "module.modulemap", +// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/i/usr/include/module.modulemap" // CHECKYAML-NEXT: }, // Test that by using the previous generated YAML file clang is able to find the diff --git a/clang/test/Modules/crash-vfs-path-traversal.m b/clang/test/Modules/crash-vfs-path-traversal.m index 891c7960f08b1..d6c9a0f2aeb8a 100644 --- a/clang/test/Modules/crash-vfs-path-traversal.m +++ b/clang/test/Modules/crash-vfs-path-traversal.m @@ -46,8 +46,8 @@ // CHECKYAML-NEXT: 'contents': [ // CHECKYAML-NEXT: { // CHECKYAML-NEXT: 'type': 'file', -// CHECKYAML-NEXT: 'name': "module.map", -// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/Inputs/crash-recovery/usr/include/module.map" +// CHECKYAML-NEXT: 'name': "module.modulemap", +// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/Inputs/crash-recovery/usr/include/module.modulemap" // CHECKYAML-NEXT: }, // Replace the paths in the YAML files with relative ".." traversals diff --git a/clang/test/Modules/crash-vfs-relative-incdir.m b/clang/test/Modules/crash-vfs-relative-incdir.m index e35c1e9fdb659..c0407f776778b 100644 --- a/clang/test/Modules/crash-vfs-relative-incdir.m +++ b/clang/test/Modules/crash-vfs-relative-incdir.m @@ -41,9 +41,9 @@ // CHECKYAML-NEXT: 'contents': [ // CHECKYAML-NEXT: { // CHECKYAML-NEXT: 'type': 'file', -// CHECKYAML-NEXT: 'name': "module.map", +// CHECKYAML-NEXT: 'name': "module.modulemap", // CHECKYAML-NOT: 'external-contents': "{{[^ ]*}}.cache -// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/Inputs/crash-recovery/usr/include/module.map" +// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/Inputs/crash-recovery/usr/include/module.modulemap" // CHECKYAML-NEXT: }, // Run the reproducer script - regular exit code is enough to test it works. diff --git a/clang/test/Modules/crash-vfs-relative-overlay.m b/clang/test/Modules/crash-vfs-relative-overlay.m index ce2902417943c..27f9c8d890666 100644 --- a/clang/test/Modules/crash-vfs-relative-overlay.m +++ b/clang/test/Modules/crash-vfs-relative-overlay.m @@ -44,9 +44,9 @@ // CHECKYAML-NEXT: 'contents': [ // CHECKYAML-NEXT: { // CHECKYAML-NEXT: 'type': 'file', -// CHECKYAML-NEXT: 'name': "module.map", +// CHECKYAML-NEXT: 'name': "module.modulemap", // CHECKYAML-NOT: 'external-contents': "{{[^ ]*}}.cache -// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/Inputs/crash-recovery/usr/include/module.map" +// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/Inputs/crash-recovery/usr/include/module.modulemap" // CHECKYAML-NEXT: }, // Test that reading the YAML file will yield the correct path after diff --git a/clang/test/Modules/crash-vfs-run-reproducer.m b/clang/test/Modules/crash-vfs-run-reproducer.m index d43f7b5e4475d..fd861fed5a603 100644 --- a/clang/test/Modules/crash-vfs-run-reproducer.m +++ b/clang/test/Modules/crash-vfs-run-reproducer.m @@ -41,9 +41,9 @@ // CHECKYAML-NEXT: 'contents': [ // CHECKYAML-NEXT: { // CHECKYAML-NEXT: 'type': 'file', -// CHECKYAML-NEXT: 'name': "module.map", +// CHECKYAML-NEXT: 'name': "module.modulemap", // CHECKYAML-NOT: 'external-contents': "{{[^ ]*}}.cache -// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/Inputs/crash-recovery/usr/include/module.map" +// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/Inputs/crash-recovery/usr/include/module.modulemap" // CHECKYAML-NEXT: }, // Run the reproducer script - regular exit code is enough to test it works. diff --git a/clang/test/Modules/declare-use-compatible.cpp b/clang/test/Modules/declare-use-compatible.cpp index a2e7f01c6c1d1..75ef5b00508d4 100644 --- a/clang/test/Modules/declare-use-compatible.cpp +++ b/clang/test/Modules/declare-use-compatible.cpp @@ -1,7 +1,7 @@ // Used module not built with -decluse. // RUN: rm -rf %t // 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: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.modulemap -o %t/b.pcm // 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 @@ -10,14 +10,14 @@ // RUN: rm -rf %t // 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: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.modulemap -o %t/b.pcm // 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 -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: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.modulemap -o %t/b.pcm // 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 @@ -26,7 +26,7 @@ // RUN: rm -rf %t // 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: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.modulemap -o %t/b.pcm // 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 diff --git a/clang/test/Modules/dependency-gen-pch.m b/clang/test/Modules/dependency-gen-pch.m index 589865e71d68a..bdc226ffe33c8 100644 --- a/clang/test/Modules/dependency-gen-pch.m +++ b/clang/test/Modules/dependency-gen-pch.m @@ -6,7 +6,7 @@ // RUN: FileCheck %s < %t.d // CHECK: dependency-gen-pch.m.o // CHECK-NEXT: dependency-gen-pch.m -// CHECK-NEXT: Inputs{{.}}module.map +// CHECK-NEXT: Inputs{{.}}module.modulemap // CHECK-NEXT: diamond_top.pcm // CHECK-NEXT: Inputs{{.}}diamond_top.h diff --git a/clang/test/Modules/dependency-gen.m b/clang/test/Modules/dependency-gen.m index cb0a875956052..cdf170238d6f6 100644 --- a/clang/test/Modules/dependency-gen.m +++ b/clang/test/Modules/dependency-gen.m @@ -4,18 +4,18 @@ // 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{{.}}module.map +// CHECK: Inputs{{.}}module.modulemap // CHECK: Inputs{{.}}diamond_top.h -// CHECK-NOT: usr{{.}}include{{.}}module.map +// CHECK-NOT: usr{{.}}include{{.}}module.modulemap // 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 -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{{.}}module.map +// CHECK-SYS: Inputs{{.}}module.modulemap // CHECK-SYS: Inputs{{.}}diamond_top.h -// CHECK-SYS: usr{{.}}include{{.}}module.map +// CHECK-SYS: usr{{.}}include{{.}}module.modulemap // CHECK-SYS: stdint.h #import "diamond_top.h" diff --git a/clang/test/Modules/diag-flags.cpp b/clang/test/Modules/diag-flags.cpp index 0db8b4412673d..9301477b4591d 100644 --- a/clang/test/Modules/diag-flags.cpp +++ b/clang/test/Modules/diag-flags.cpp @@ -1,32 +1,32 @@ // RUN: rm -rf %t // // For an implicit module, all that matters are the warning flags in the user. -// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodules-cache-path=%t -fmodule-name=diag_flags -x c++ %S/Inputs/module.map -std=c++20 +// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodules-cache-path=%t -fmodule-name=diag_flags -x c++ %S/Inputs/module.modulemap -std=c++20 // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DWARNING -DLOCAL_WARNING -Wpadded // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DERROR -DLOCAL_ERROR -Wpadded -Werror // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DERROR -DLOCAL_ERROR -Werror=padded // // For an explicit module, all that matters are the warning flags in the module build. -// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.map -std=c++20 -o %t/nodiag.pcm +// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.modulemap -std=c++20 -o %t/nodiag.pcm // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -fmodule-file=%t/nodiag.pcm -Wpadded -DLOCAL_WARNING // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -fmodule-file=%t/nodiag.pcm -Werror -Wpadded -DLOCAL_ERROR // -// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.map -std=c++20 -o %t/warning.pcm -Wpadded +// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.modulemap -std=c++20 -o %t/warning.pcm -Wpadded // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DWARNING -fmodule-file=%t/warning.pcm // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DWARNING -fmodule-file=%t/warning.pcm -Werror=padded -DLOCAL_ERROR // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DWARNING -fmodule-file=%t/warning.pcm -Werror // -// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.map -std=c++20 -o %t/werror-no-error.pcm -Werror -Wpadded -Wno-error=padded +// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.modulemap -std=c++20 -o %t/werror-no-error.pcm -Werror -Wpadded -Wno-error=padded // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DWARNING -fmodule-file=%t/werror-no-error.pcm // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DWARNING -fmodule-file=%t/werror-no-error.pcm -Wno-padded // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DWARNING -fmodule-file=%t/werror-no-error.pcm -Werror=padded -DLOCAL_ERROR // -// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.map -std=c++20 -o %t/error.pcm -Werror=padded +// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.modulemap -std=c++20 -o %t/error.pcm -Werror=padded // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DERROR -fmodule-file=%t/error.pcm -Wno-padded // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DERROR -fmodule-file=%t/error.pcm -Wno-error=padded // -// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.map -std=c++20 -o %t/werror.pcm -Werror -Wpadded +// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_flags -x c++ %S/Inputs/module.modulemap -std=c++20 -o %t/werror.pcm -Werror -Wpadded // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DERROR -fmodule-file=%t/werror.pcm -Wno-error // RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DERROR -fmodule-file=%t/werror.pcm -Wno-padded diff --git a/clang/test/Modules/diag-pragma.c b/clang/test/Modules/diag-pragma.c index 63be4bf93afcf..80224629a1c81 100644 --- a/clang/test/Modules/diag-pragma.c +++ b/clang/test/Modules/diag-pragma.c @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// 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 -emit-module -fmodules-cache-path=%t -fmodule-name=diag_pragma %S/Inputs/module.modulemap // 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. diff --git a/clang/test/Modules/diag-pragma.cpp b/clang/test/Modules/diag-pragma.cpp index b1f10365e2356..4b6318045372a 100644 --- a/clang/test/Modules/diag-pragma.cpp +++ b/clang/test/Modules/diag-pragma.cpp @@ -1,7 +1,7 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -emit-module -fmodules-cache-path=%t -fmodule-name=diag_pragma -x c++ %S/Inputs/module.map -std=c++20 +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -emit-module -fmodules-cache-path=%t -fmodule-name=diag_pragma -x c++ %S/Inputs/module.modulemap -std=c++20 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_pragma -x c++ %S/Inputs/module.map -std=c++20 -o %t/explicit.pcm -Werror=string-plus-int +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -emit-module -fmodule-name=diag_pragma -x c++ %S/Inputs/module.modulemap -std=c++20 -o %t/explicit.pcm -Werror=string-plus-int // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=%t -I %S/Inputs %s -std=c++20 -DEXPLICIT_FLAG -fmodule-file=%t/explicit.pcm #include "diag_pragma.h" diff --git a/clang/test/Modules/diamond-pch.c b/clang/test/Modules/diamond-pch.c index 41cfd9c53b85a..b60420cb8ed0b 100644 --- a/clang/test/Modules/diamond-pch.c +++ b/clang/test/Modules/diamond-pch.c @@ -1,8 +1,8 @@ // RUN: rm -rf %t -// 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-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.modulemap // 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. diff --git a/clang/test/Modules/diamond.c b/clang/test/Modules/diamond.c index c2e009fbc1d98..1e0641cafd87b 100644 --- a/clang/test/Modules/diamond.c +++ b/clang/test/Modules/diamond.c @@ -1,8 +1,8 @@ // RUN: rm -rf %t -// 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-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.modulemap // 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. diff --git a/clang/test/Modules/extern_c_bad.cpp b/clang/test/Modules/extern_c_bad.cpp index c34416a4b7156..cd4e5abdfbfa7 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 -fimplicit-module-maps -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.modulemap 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 7ab6f78c194fd..c3e67834802b6 100644 --- a/clang/test/Modules/fmodules-validate-once-per-build-session.c +++ b/clang/test/Modules/fmodules-validate-once-per-build-session.c @@ -11,8 +11,8 @@ // foo.h as a system header. // RUN: echo 'void meow(void);' > %t/Inputs/foo.h // RUN: echo 'void woof(void);' > %t/Inputs/bar.h -// RUN: echo 'module Foo { header "foo.h" }' > %t/Inputs/module.map -// RUN: echo 'extern module Bar "bar.modulemap"' >> %t/Inputs/module.map +// RUN: echo 'module Foo { header "foo.h" }' > %t/Inputs/module.modulemap +// RUN: echo 'extern module Bar "bar.modulemap"' >> %t/Inputs/module.modulemap // RUN: echo 'module Bar { header "bar.h" }' > %t/Inputs/bar.modulemap // === @@ -53,7 +53,7 @@ // === // Use the module, and make sure that we did not recompile it if foo.h or -// module.map are system files, even though the sources changed. +// module.modulemap are system files, even though the sources changed. // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fmodules-validate-system-headers -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 -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp diff --git a/clang/test/Modules/fsystem-module.m b/clang/test/Modules/fsystem-module.m index 6ef91b762b0f4..7eeb35d18f0a1 100644 --- a/clang/test/Modules/fsystem-module.m +++ b/clang/test/Modules/fsystem-module.m @@ -6,13 +6,13 @@ // RUN: not %clang_cc1 -fmodules -I %S/Inputs \ // RUN: -emit-module -fmodule-name=warning -pedantic -Werror \ -// RUN: %S/Inputs/module.map -o %t.dir/warning.pcm +// RUN: %S/Inputs/module.modulemap -o %t.dir/warning.pcm // RUN: %clang_cc1 -fmodules -I %S/Inputs \ // RUN: -emit-module -fmodule-name=warning -pedantic -Werror \ -// RUN: %S/Inputs/module.map -o %t.dir/warning-system.pcm -fsystem-module +// RUN: %S/Inputs/module.modulemap -o %t.dir/warning-system.pcm -fsystem-module // RUN: not %clang_cc1 -fmodules -I %S/Inputs \ // RUN: -emit-module -fmodule-name=warning -pedantic -Werror \ -// RUN: %S/Inputs/module.map -o %t.dir/warning-system.pcm -fsystem-module \ +// RUN: %S/Inputs/module.modulemap -o %t.dir/warning-system.pcm -fsystem-module \ // RUN: -Wsystem-headers diff --git a/clang/test/Modules/irgen.c b/clang/test/Modules/irgen.c index 92bd855c90753..a1e07eb1d87e9 100644 --- a/clang/test/Modules/irgen.c +++ b/clang/test/Modules/irgen.c @@ -1,6 +1,6 @@ // REQUIRES: x86-registered-target // RUN: rm -rf %t -// 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 -emit-module -fmodule-name=irgen -triple x86_64-apple-darwin10 %S/Inputs/module.modulemap // 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. diff --git a/clang/test/Modules/linkage-merge.m b/clang/test/Modules/linkage-merge.m index e7b9e5cec1367..c38524fa577be 100644 --- a/clang/test/Modules/linkage-merge.m +++ b/clang/test/Modules/linkage-merge.m @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// 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 -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=linkage_merge_left %S/Inputs/module.modulemap // 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 diff --git a/clang/test/Modules/load_failure.c b/clang/test/Modules/load_failure.c index 6e63ba2adb196..3a8d29597348d 100644 --- a/clang/test/Modules/load_failure.c +++ b/clang/test/Modules/load_failure.c @@ -7,7 +7,7 @@ #endif // RUN: rm -rf %t -// 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: %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.modulemap // 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 diff --git a/clang/test/Modules/lookup.cpp b/clang/test/Modules/lookup.cpp index e847d78b274f1..95c30bf3eedff 100644 --- a/clang/test/Modules/lookup.cpp +++ b/clang/test/Modules/lookup.cpp @@ -24,8 +24,8 @@ void f() { } // RUN: rm -rf %t -// 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++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_left_cxx %S/Inputs/module.modulemap -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.modulemap -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. diff --git a/clang/test/Modules/lookup.m b/clang/test/Modules/lookup.m index 0e09bfdd7fd95..33e0408d8481d 100644 --- a/clang/test/Modules/lookup.m +++ b/clang/test/Modules/lookup.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// 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 -fmodules-cache-path=%t -emit-module -x objective-c -fmodule-name=lookup_left_objc %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -emit-module -x objective-c -fmodule-name=lookup_right_objc %S/Inputs/module.modulemap // 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 diff --git a/clang/test/Modules/merge-concepts.cppm b/clang/test/Modules/merge-concepts.cppm index 9b611bc2f1b5e..f8a763adaff66 100644 --- a/clang/test/Modules/merge-concepts.cppm +++ b/clang/test/Modules/merge-concepts.cppm @@ -24,16 +24,16 @@ // // RUN: rm -f %t/foo.pcm // RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -fprebuilt-module-path=%t \ -// RUN: -fmodule-map-file=%t/module.map %t/Use7.cpp -verify -fsyntax-only +// RUN: -fmodule-map-file=%t/module.modulemap %t/Use7.cpp -verify -fsyntax-only // RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -fprebuilt-module-path=%t \ -// RUN: -fmodule-map-file=%t/module.map %t/Use7.cpp -verify -fsyntax-only +// RUN: -fmodule-map-file=%t/module.modulemap %t/Use7.cpp -verify -fsyntax-only // Testing module map modules with named modules. -// RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -fmodule-map-file=%t/module.map \ +// RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -fmodule-map-file=%t/module.modulemap \ // RUN: %t/A.cppm -o %t/A.pcm // RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -fprebuilt-module-path=%t \ -// RUN: -fmodule-map-file=%t/module.map %t/Use7.cpp -verify -fsyntax-only +// RUN: -fmodule-map-file=%t/module.modulemap %t/Use7.cpp -verify -fsyntax-only // RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -fprebuilt-module-path=%t \ -// RUN: -fmodule-map-file=%t/module.map %t/Use7.cpp -verify -fsyntax-only +// RUN: -fmodule-map-file=%t/module.modulemap %t/Use7.cpp -verify -fsyntax-only // //--- foo.h @@ -158,7 +158,7 @@ template void foo() requires same_as {} -//--- module.map +//--- module.modulemap module "foo" { export * header "foo.h" diff --git a/clang/test/Modules/missing-header.m b/clang/test/Modules/missing-header.m index d865078e3a2f8..c162e1b5f08b3 100644 --- a/clang/test/Modules/missing-header.m +++ b/clang/test/Modules/missing-header.m @@ -9,5 +9,5 @@ // CHECK-NOT: missing_unavailable_headers @import missing_headers; -// CHECK: module.map:15:27: error: header 'missing.h' not found +// CHECK: module.modulemap:15:27: error: header 'missing.h' not found // CHECK: could not build module 'missing_headers' diff --git a/clang/test/Modules/modify-module.m b/clang/test/Modules/modify-module.m index d59a4799104ff..903bf4018b01a 100644 --- a/clang/test/Modules/modify-module.m +++ b/clang/test/Modules/modify-module.m @@ -5,7 +5,7 @@ // RUN: mkdir -p %t/include // RUN: cat %S/Inputs/Modified/A.h > %t/include/A.h // RUN: cat %S/Inputs/Modified/B.h > %t/include/B.h -// RUN: cat %S/Inputs/Modified/module.map > %t/include/module.map +// RUN: cat %S/Inputs/Modified/module.modulemap > %t/include/module.modulemap // 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 -fimplicit-module-maps -I %t/include %s -verify diff --git a/clang/test/Modules/module-file-home-is-cwd.m b/clang/test/Modules/module-file-home-is-cwd.m index a3875d578bb60..13495ebf06fb7 100644 --- a/clang/test/Modules/module-file-home-is-cwd.m +++ b/clang/test/Modules/module-file-home-is-cwd.m @@ -2,13 +2,13 @@ // RUN: cd %S // RUN: %clang_cc1 -x objective-c -fmodules -fno-implicit-modules \ // RUN: -fmodule-file-home-is-cwd -fmodule-name=libA -emit-module \ -// RUN: -fmodules-embed-all-files %S/Inputs/normal-module-map/module.map \ +// RUN: -fmodules-embed-all-files %S/Inputs/normal-module-map/module.modulemap \ // RUN: -o %t/mod.pcm // RUN: llvm-bcanalyzer --dump --disable-histogram %t/mod.pcm | FileCheck %s // RUN: llvm-bcanalyzer --dump --disable-histogram %t/mod.pcm | FileCheck %s --check-prefix=INPUT // CHECK-NOT: MODULE_DIRECTORY -// INPUT: blob data = 'Inputs{{/|\\}}normal-module-map{{/|\\}}module.map' +// INPUT: blob data = 'Inputs{{/|\\}}normal-module-map{{/|\\}}module.modulemap' // INPUT: blob data = 'Inputs{{/|\\}}normal-module-map{{/|\\}}a2.h' // INPUT: blob data = 'Inputs{{/|\\}}normal-module-map{{/|\\}}a1.h' @@ -17,7 +17,7 @@ // RUN: cd %t // RUN: %clang_cc1 -x objective-c -fmodules -fno-implicit-modules -debug-info-kind=limited \ // RUN: -debugger-tuning=lldb -dwarf-ext-refs -fmodule-file-home-is-cwd \ -// RUN: -fmodule-map-file=%S/Inputs/normal-module-map/module.map \ +// RUN: -fmodule-map-file=%S/Inputs/normal-module-map/module.modulemap \ // RUN: -fmodule-file=libA=mod.pcm -emit-llvm -o %t-mod.ll %s // RUN: cat %t-mod.ll | FileCheck %s --check-prefix=SKELETON diff --git a/clang/test/Modules/module-private.cpp b/clang/test/Modules/module-private.cpp index 2848226ba067c..4036c345ef3c9 100644 --- a/clang/test/Modules/module-private.cpp +++ b/clang/test/Modules/module-private.cpp @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -std=c++17 -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 -std=c++17 -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 -std=c++17 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -fmodule-name=module_private_left -emit-module %S/Inputs/module.modulemap +// RUN: %clang_cc1 -std=c++17 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -fmodule-name=module_private_right -emit-module %S/Inputs/module.modulemap // RUN: %clang_cc1 -std=c++17 -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. diff --git a/clang/test/Modules/module_file_info.m b/clang/test/Modules/module_file_info.m index 179c7f35df4ac..f5ba25d54b97c 100644 --- a/clang/test/Modules/module_file_info.m +++ b/clang/test/Modules/module_file_info.m @@ -16,7 +16,7 @@ // CHECK: Generated by this Clang: // CHECK: Module name: DependsOnModule -// CHECK: Module map file: {{.*}}DependsOnModule.framework{{[/\\]}}module.map +// CHECK: Module map file: {{.*}}DependsOnModule.framework{{[/\\]}}Modules{{[/\\]}}module.modulemap // CHECK: Imports module 'Module': {{.*}}Module{{.*}}.pcm // CHECK: Language options: @@ -47,10 +47,10 @@ // MACROS: Predefined macros: // MACROS-NEXT: -DBLARG // MACROS-NEXT: -DWIBBLE=WOBBLE -// CHECK: Input file: {{.*}}module.map -// CHECK-NEXT: Input file: {{.*}}module_private.map +// CHECK: Input file: {{.*}}module.modulemap +// CHECK-NEXT: Input file: {{.*}}module.private.modulemap // CHECK-NEXT: Input file: {{.*}}DependsOnModule.h -// CHECK-NEXT: Input file: {{.*}}module.map +// CHECK-NEXT: Input file: {{.*}}module.modulemap // CHECK-NEXT: Input file: {{.*}}other.h // CHECK-NEXT: Input file: {{.*}}not_cxx.h // CHECK-NEXT: Input file: {{.*}}not_coroutines.h diff --git a/clang/test/Modules/modulemap-locations.m b/clang/test/Modules/modulemap-locations.m index e5738e105263a..330a03d1fb633 100644 --- a/clang/test/Modules/modulemap-locations.m +++ b/clang/test/Modules/modulemap-locations.m @@ -2,9 +2,13 @@ // 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 -Wno-private-module // regular +@import module_map; // expected-warning@*{{as a module map name is deprecated, rename it to module.modulemap}} + // expected-warning@*{{as a module map name is deprecated, rename it to module.private.modulemap}} @import module_modulemap; @import both; // framework +@import Module_Map_F; // expected-warning@*{{as a module map name is deprecated, rename it to module.modulemap in the 'Modules' directory of the framework}} +@import Module_Map_F; // expected-warning@*{{as a module map name is deprecated, rename it to module.private.modulemap in the 'Modules' directory of the framework}} @import Module_ModuleMap_F; @import Module_ModuleMap_F.Private; @import Both_F; diff --git a/clang/test/Modules/no-stale-modtime.m b/clang/test/Modules/no-stale-modtime.m index c7ff21c22a9f5..92c18ac591add 100644 --- a/clang/test/Modules/no-stale-modtime.m +++ b/clang/test/Modules/no-stale-modtime.m @@ -11,9 +11,9 @@ // RUN: echo '// top' > %t/t.h-1 // RUN: cat %t/t.h-1 > %t/t.h -// RUN: echo 'module b { header "b.h" } module l { header "l.h" }' > %t/module.map-1 -// RUN: echo 'module r { header "r.h" } module t { header "t.h" }' > %t/module.map-2 -// RUN: cat %t/module.map-1 %t/module.map-2 > %t/module.map +// RUN: echo 'module b { header "b.h" } module l { header "l.h" }' > %t/module.modulemap-1 +// RUN: echo 'module r { header "r.h" } module t { header "t.h" }' > %t/module.modulemap-2 +// RUN: cat %t/module.modulemap-1 %t/module.modulemap-2 > %t/module.modulemap // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -fdisable-module-hash \ // RUN: -I %t -fsyntax-only %s -Rmodule-build 2>&1 \ diff --git a/clang/test/Modules/objc-at-keyword.m b/clang/test/Modules/objc-at-keyword.m index 0e058a309017a..b4136cfecbd07 100644 --- a/clang/test/Modules/objc-at-keyword.m +++ b/clang/test/Modules/objc-at-keyword.m @@ -1,6 +1,6 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -verify -x objective-c -fmodule-name=objcAtKeywordMissingEnd -emit-module %S/Inputs/module.map -// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=Empty -emit-module %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -verify -x objective-c -fmodule-name=objcAtKeywordMissingEnd -emit-module %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=Empty -emit-module %S/Inputs/module.modulemap // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -verify -I %S/Inputs %s @interface X // expected-note {{class started here}} diff --git a/clang/test/Modules/objc-categories.m b/clang/test/Modules/objc-categories.m index 8bc73a29c51cb..a2f331332c90f 100644 --- a/clang/test/Modules/objc-categories.m +++ b/clang/test/Modules/objc-categories.m @@ -1,9 +1,9 @@ // RUN: rm -rf %t -// 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 -x objective-c -fmodule-name=category_top -emit-module %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=category_left -emit-module %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=category_right -emit-module %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=category_bottom -emit-module %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=category_other -emit-module %S/Inputs/module.modulemap // 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-type-param.m b/clang/test/Modules/objc-type-param.m index 3417d62b25ffb..cf6008768cbe5 100644 --- a/clang/test/Modules/objc-type-param.m +++ b/clang/test/Modules/objc-type-param.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=objc_type_param -emit-module %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -x objective-c -fmodule-name=objc_type_param -emit-module %S/Inputs/module.modulemap // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -verify @import objc_type_param; diff --git a/clang/test/Modules/objc_redef.m b/clang/test/Modules/objc_redef.m index 2e57f41bc6624..b2a75140a76b8 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 -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 -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=weird_objc %S/Inputs/module.modulemap // 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_hash-blocks.cpp b/clang/test/Modules/odr_hash-blocks.cpp index 512c659f841e4..b1e62a1cf0b99 100644 --- a/clang/test/Modules/odr_hash-blocks.cpp +++ b/clang/test/Modules/odr_hash-blocks.cpp @@ -17,12 +17,12 @@ // RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++11 -fblocks %t/Inputs/second.h // Build module map file -// RUN: echo "module FirstModule {" >> %t/Inputs/module.map -// RUN: echo " header \"first.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map -// RUN: echo "module SecondModule {" >> %t/Inputs/module.map -// RUN: echo " header \"second.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map +// RUN: echo "module FirstModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"first.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap +// RUN: echo "module SecondModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"second.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap // Run test // RUN: %clang_cc1 -fmodules -fimplicit-module-maps \ diff --git a/clang/test/Modules/odr_hash-gnu.cpp b/clang/test/Modules/odr_hash-gnu.cpp index f87b2b841f905..a212118a39a8a 100644 --- a/clang/test/Modules/odr_hash-gnu.cpp +++ b/clang/test/Modules/odr_hash-gnu.cpp @@ -17,12 +17,12 @@ // RUN: %clang_cc1 -fsyntax-only -x c++ -std=gnu++11 %t/Inputs/second.h // Build module map file -// RUN: echo "module FirstModule {" >> %t/Inputs/module.map -// RUN: echo " header \"first.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map -// RUN: echo "module SecondModule {" >> %t/Inputs/module.map -// RUN: echo " header \"second.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map +// RUN: echo "module FirstModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"first.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap +// RUN: echo "module SecondModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"second.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap // Run test // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -x c++ -I%t/Inputs -verify %s -std=gnu++11 diff --git a/clang/test/Modules/odr_hash-vector.cpp b/clang/test/Modules/odr_hash-vector.cpp index ee59cb617c1a6..e2da431a73255 100644 --- a/clang/test/Modules/odr_hash-vector.cpp +++ b/clang/test/Modules/odr_hash-vector.cpp @@ -17,12 +17,12 @@ // RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++11 %t/Inputs/second.h -fzvector // Build module map file -// RUN: echo "module FirstModule {" >> %t/Inputs/module.map -// RUN: echo " header \"first.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map -// RUN: echo "module SecondModule {" >> %t/Inputs/module.map -// RUN: echo " header \"second.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map +// RUN: echo "module FirstModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"first.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap +// RUN: echo "module SecondModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"second.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap // Run test // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -x c++ -I%t/Inputs -verify %s -std=c++11 -fzvector diff --git a/clang/test/Modules/odr_hash.cl b/clang/test/Modules/odr_hash.cl index d4af1cea6e265..474da6e62f159 100644 --- a/clang/test/Modules/odr_hash.cl +++ b/clang/test/Modules/odr_hash.cl @@ -17,12 +17,12 @@ // RUN: %clang_cc1 -fsyntax-only -x c++ %t/Inputs/second.h -cl-std=CL2.0 // Build module map file -// RUN: echo "module FirstModule {" >> %t/Inputs/module.map -// RUN: echo " header \"first.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map -// RUN: echo "module SecondModule {" >> %t/Inputs/module.map -// RUN: echo " header \"second.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map +// RUN: echo "module FirstModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"first.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap +// RUN: echo "module SecondModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"second.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap // Run test // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -x c++ -I%t/Inputs -verify %s -cl-std=CL2.0 diff --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp index 7954a1f5f2e50..220ef767df849 100644 --- a/clang/test/Modules/odr_hash.cpp +++ b/clang/test/Modules/odr_hash.cpp @@ -17,12 +17,12 @@ // RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++1z %t/Inputs/second.h // Build module map file -// RUN: echo "module FirstModule {" >> %t/Inputs/module.map -// RUN: echo " header \"first.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map -// RUN: echo "module SecondModule {" >> %t/Inputs/module.map -// RUN: echo " header \"second.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map +// RUN: echo "module FirstModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"first.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap +// RUN: echo "module SecondModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"second.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap // Run test // RUN: %clang_cc1 -triple x86_64-linux-gnu -x c++ -std=c++1z \ diff --git a/clang/test/Modules/odr_hash.mm b/clang/test/Modules/odr_hash.mm index 9c6454a790edb..512c8adc15924 100644 --- a/clang/test/Modules/odr_hash.mm +++ b/clang/test/Modules/odr_hash.mm @@ -17,12 +17,12 @@ // RUN: %clang_cc1 -fsyntax-only -x objective-c++ %t/Inputs/second.h -fblocks -fobjc-arc // Build module map file -// RUN: echo "module FirstModule {" >> %t/Inputs/module.map -// RUN: echo " header \"first.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map -// RUN: echo "module SecondModule {" >> %t/Inputs/module.map -// RUN: echo " header \"second.h\"" >> %t/Inputs/module.map -// RUN: echo "}" >> %t/Inputs/module.map +// RUN: echo "module FirstModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"first.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap +// RUN: echo "module SecondModule {" >> %t/Inputs/module.modulemap +// RUN: echo " header \"second.h\"" >> %t/Inputs/module.modulemap +// RUN: echo "}" >> %t/Inputs/module.modulemap // Run test // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -x objective-c++ -I%t/Inputs -verify %s -fblocks -fobjc-arc diff --git a/clang/test/Modules/pragma-pack.cpp b/clang/test/Modules/pragma-pack.cpp index 96a880c6307b0..8239cafd6907e 100644 --- a/clang/test/Modules/pragma-pack.cpp +++ b/clang/test/Modules/pragma-pack.cpp @@ -2,7 +2,7 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fmodules \ // RUN: -fimplicit-module-maps -x c++ -emit-module \ // RUN: -fmodules-cache-path=%t.cache \ -// RUN: -fmodule-name=pragma_pack %S/Inputs/module.map +// RUN: -fmodule-name=pragma_pack %S/Inputs/module.modulemap // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fmodules \ // RUN: -fimplicit-module-maps -x c++ -verify \ // RUN: -fmodules-cache-path=%t.cache \ @@ -11,7 +11,7 @@ // RUN: -fmodules-local-submodule-visibility \ // RUN: -fimplicit-module-maps -x c++ -emit-module \ // RUN: -fmodules-cache-path=%tlocal.cache \ -// RUN: -fmodule-name=pragma_pack %S/Inputs/module.map +// RUN: -fmodule-name=pragma_pack %S/Inputs/module.modulemap // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fmodules \ // RUN: -fmodules-local-submodule-visibility \ // RUN: -fimplicit-module-maps -x c++ -verify \ diff --git a/clang/test/Modules/recursive.c b/clang/test/Modules/recursive.c index 9c03a6ac4548b..efb21320f7768 100644 --- a/clang/test/Modules/recursive.c +++ b/clang/test/Modules/recursive.c @@ -3,7 +3,7 @@ #include "recursive1.h" // RUN: rm -rf %t -// 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 +// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=recursive1 %S/Inputs/module.modulemap 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/redecl-namespaces.mm b/clang/test/Modules/redecl-namespaces.mm index e17af86feba81..9732b31f2b92d 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 -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 -x objective-c++ -fmodules-cache-path=%t -emit-module -fmodule-name=redecl_namespaces_left %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -emit-module -fmodule-name=redecl_namespaces_right %S/Inputs/module.modulemap // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -w %s -verify diff --git a/clang/test/Modules/redeclarations.m b/clang/test/Modules/redeclarations.m index e3f78f28d75c5..dacc84c6df469 100644 --- a/clang/test/Modules/redeclarations.m +++ b/clang/test/Modules/redeclarations.m @@ -5,8 +5,8 @@ @interface MyObject : NSObject @end // RUN: rm -rf %t -// 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 -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.modulemap +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_right %S/Inputs/module.modulemap // 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/relative-submodule-topheader.m b/clang/test/Modules/relative-submodule-topheader.m index c7c2f13076866..ec973a9c96893 100644 --- a/clang/test/Modules/relative-submodule-topheader.m +++ b/clang/test/Modules/relative-submodule-topheader.m @@ -1,5 +1,5 @@ // RUN: cd %S -// RUN: %clang_cc1 -fmodules -fno-implicit-modules -x objective-c++ -fmodule-name=std -emit-module Inputs/submodules/module.map -o %t/mod.pcm +// RUN: %clang_cc1 -fmodules -fno-implicit-modules -x objective-c++ -fmodule-name=std -emit-module Inputs/submodules/module.modulemap -o %t/mod.pcm // RUN: llvm-bcanalyzer --dump --disable-histogram %t/mod.pcm | FileCheck %s // CHECK: blob data = 'vector.h' diff --git a/clang/test/Modules/requires-coroutines.mm b/clang/test/Modules/requires-coroutines.mm index 21b8b8b097e91..c432c579fe5f2 100644 --- a/clang/test/Modules/requires-coroutines.mm +++ b/clang/test/Modules/requires-coroutines.mm @@ -2,5 +2,5 @@ // RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -Wno-private-module -F %S/Inputs -I %S/Inputs/DependsOnModule.framework %s -verify @import DependsOnModule.NotCoroutines; -// expected-error@module.map:25 {{module 'DependsOnModule.Coroutines' requires feature 'coroutines'}} +// expected-error@Modules/module.modulemap:25 {{module 'DependsOnModule.Coroutines' requires feature 'coroutines'}} @import DependsOnModule.Coroutines; // expected-note {{module imported here}} diff --git a/clang/test/Modules/requires-gnuinlineasm.m b/clang/test/Modules/requires-gnuinlineasm.m index e710b6bf8d4b5..e1900b1451079 100644 --- a/clang/test/Modules/requires-gnuinlineasm.m +++ b/clang/test/Modules/requires-gnuinlineasm.m @@ -9,7 +9,7 @@ // RUN: -DASM_INLINE -verify #ifdef NO_ASM_INLINE -// expected-error@NeedsGNUInlineAsm.framework/module.map:4 {{module 'NeedsGNUInlineAsm.Asm' requires feature 'gnuinlineasm'}} +// expected-error@NeedsGNUInlineAsm.framework/Modules/module.modulemap:4 {{module 'NeedsGNUInlineAsm.Asm' requires feature 'gnuinlineasm'}} @import NeedsGNUInlineAsm.Asm; // expected-note {{module imported here}} #endif diff --git a/clang/test/Modules/requires.m b/clang/test/Modules/requires.m index 77f00a0e47c18..a47ea2b4bd0c9 100644 --- a/clang/test/Modules/requires.m +++ b/clang/test/Modules/requires.m @@ -2,39 +2,39 @@ // RUN: %clang_cc1 -Rmodule-include-translation -Wno-private-module -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -I %S/Inputs %s -verify -fmodule-feature custom_req1 // RUN: %clang_cc1 -Rmodule-include-translation -Wno-private-module -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -I %S/Inputs %s -verify -std=c89 -DTEST_C_FEATURES #ifndef TEST_C_FEATURES -// expected-error@DependsOnModule.framework/module.map:7 {{module 'DependsOnModule.CXX' requires feature 'cplusplus'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:7 {{module 'DependsOnModule.CXX' requires feature 'cplusplus'}} @import DependsOnModule.CXX; // expected-note {{module imported here}} @import DependsOnModule.NotCXX; -// expected-error@DependsOnModule.framework/module.map:15 {{module 'DependsOnModule.NotObjC' is incompatible with feature 'objc'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:15 {{module 'DependsOnModule.NotObjC' is incompatible with feature 'objc'}} @import DependsOnModule.NotObjC; // expected-note {{module imported here}} @import DependsOnModule.CustomReq1; // OK -// expected-error@DependsOnModule.framework/module.map:22 {{module 'DependsOnModule.CustomReq2' requires feature 'custom_req2'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:22 {{module 'DependsOnModule.CustomReq2' requires feature 'custom_req2'}} @import DependsOnModule.CustomReq2; // expected-note {{module imported here}} @import RequiresWithMissingHeader; // OK -// expected-error@module.map:* {{module 'RequiresWithMissingHeader.HeaderBefore' requires feature 'missing'}} +// expected-error@module.modulemap:* {{module 'RequiresWithMissingHeader.HeaderBefore' requires feature 'missing'}} @import RequiresWithMissingHeader.HeaderBefore; // expected-note {{module imported here}} -// expected-error@module.map:* {{module 'RequiresWithMissingHeader.HeaderAfter' requires feature 'missing'}} +// expected-error@module.modulemap:* {{module 'RequiresWithMissingHeader.HeaderAfter' requires feature 'missing'}} @import RequiresWithMissingHeader.HeaderAfter; // expected-note {{module imported here}} -// expected-error@DependsOnModule.framework/module.map:40 {{module 'DependsOnModule.CXX11' requires feature 'cplusplus11'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:40 {{module 'DependsOnModule.CXX11' requires feature 'cplusplus11'}} @import DependsOnModule.CXX11; // expected-note {{module imported here}} -// expected-error@DependsOnModule.framework/module.map:43 {{module 'DependsOnModule.CXX14' requires feature 'cplusplus14'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:43 {{module 'DependsOnModule.CXX14' requires feature 'cplusplus14'}} @import DependsOnModule.CXX14; // expected-note {{module imported here}} -// expected-error@DependsOnModule.framework/module.map:46 {{module 'DependsOnModule.CXX17' requires feature 'cplusplus17'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:46 {{module 'DependsOnModule.CXX17' requires feature 'cplusplus17'}} @import DependsOnModule.CXX17; // expected-note {{module imported here}} -// expected-error@DependsOnModule.framework/module.map:49 {{module 'DependsOnModule.CXX20' requires feature 'cplusplus20'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:49 {{module 'DependsOnModule.CXX20' requires feature 'cplusplus20'}} @import DependsOnModule.CXX20; // expected-note {{module imported here}} -// expected-error@DependsOnModule.framework/module.map:52 {{module 'DependsOnModule.CXX23' requires feature 'cplusplus23'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:52 {{module 'DependsOnModule.CXX23' requires feature 'cplusplus23'}} @import DependsOnModule.CXX23; // expected-note {{module imported here}} -// expected-error@DependsOnModule.framework/module.map:55 {{module 'DependsOnModule.CXX26' requires feature 'cplusplus26'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:55 {{module 'DependsOnModule.CXX26' requires feature 'cplusplus26'}} @import DependsOnModule.CXX26; // expected-note {{module imported here}} #else -// expected-error@DependsOnModule.framework/module.map:58 {{module 'DependsOnModule.C99' requires feature 'c99'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:58 {{module 'DependsOnModule.C99' requires feature 'c99'}} @import DependsOnModule.C99; // expected-note {{module imported here}} -// expected-error@DependsOnModule.framework/module.map:61 {{module 'DependsOnModule.C11' requires feature 'c11'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:61 {{module 'DependsOnModule.C11' requires feature 'c11'}} @import DependsOnModule.C11; // expected-note {{module imported here}} -// expected-error@DependsOnModule.framework/module.map:64 {{module 'DependsOnModule.C17' requires feature 'c17'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:64 {{module 'DependsOnModule.C17' requires feature 'c17'}} @import DependsOnModule.C17; // expected-note {{module imported here}} -// expected-error@DependsOnModule.framework/module.map:67 {{module 'DependsOnModule.C23' requires feature 'c23'}} +// expected-error@DependsOnModule.framework/Modules/module.modulemap:67 {{module 'DependsOnModule.C23' requires feature 'c23'}} @import DependsOnModule.C23; // expected-note {{module imported here}} #endif diff --git a/clang/test/Modules/requires.mm b/clang/test/Modules/requires.mm index 4b11fcb33e1b9..943823994eeb2 100644 --- a/clang/test/Modules/requires.mm +++ b/clang/test/Modules/requires.mm @@ -2,7 +2,7 @@ // RUN: %clang_cc1 -Rmodule-include-translation -Wno-private-module -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -I %S/Inputs/DependsOnModule.framework %s -verify @import DependsOnModule.CXX; -// expected-error@module.map:11 {{module 'DependsOnModule.NotCXX' is incompatible with feature 'cplusplus'}} +// expected-error@Modules/module.modulemap:11 {{module 'DependsOnModule.NotCXX' is incompatible with feature 'cplusplus'}} @import DependsOnModule.NotCXX; // expected-note {{module imported here}} -// expected-error@module.map:15 {{module 'DependsOnModule.NotObjC' is incompatible with feature 'objc'}} +// expected-error@Modules/module.modulemap:15 {{module 'DependsOnModule.NotObjC' is incompatible with feature 'objc'}} @import DependsOnModule.NotObjC; // expected-note {{module imported here}} diff --git a/clang/test/Modules/target-platform-features.m b/clang/test/Modules/target-platform-features.m index 875c83a2a545b..08fad5b4432af 100644 --- a/clang/test/Modules/target-platform-features.m +++ b/clang/test/Modules/target-platform-features.m @@ -4,17 +4,17 @@ // RUN: mkdir %t/cache // RUN: mkdir %t/InputsA -// RUN: echo "module RequiresMacOS {" >> %t/InputsA/module.map -// RUN: echo " requires macos" >> %t/InputsA/module.map -// RUN: echo "}" >> %t/InputsA/module.map -// RUN: echo "module RequiresNotiOS {" >> %t/InputsA/module.map -// RUN: echo " requires !ios" >> %t/InputsA/module.map -// RUN: echo "}" >> %t/InputsA/module.map -// RUN: echo "module RequiresMain {" >> %t/InputsA/module.map -// RUN: echo " module SubRequiresNotiOS {" >> %t/InputsA/module.map -// RUN: echo " requires !ios" >> %t/InputsA/module.map -// RUN: echo " }" >> %t/InputsA/module.map -// RUN: echo "}" >> %t/InputsA/module.map +// RUN: echo "module RequiresMacOS {" >> %t/InputsA/module.modulemap +// RUN: echo " requires macos" >> %t/InputsA/module.modulemap +// RUN: echo "}" >> %t/InputsA/module.modulemap +// RUN: echo "module RequiresNotiOS {" >> %t/InputsA/module.modulemap +// RUN: echo " requires !ios" >> %t/InputsA/module.modulemap +// RUN: echo "}" >> %t/InputsA/module.modulemap +// RUN: echo "module RequiresMain {" >> %t/InputsA/module.modulemap +// RUN: echo " module SubRequiresNotiOS {" >> %t/InputsA/module.modulemap +// RUN: echo " requires !ios" >> %t/InputsA/module.modulemap +// RUN: echo " }" >> %t/InputsA/module.modulemap +// RUN: echo "}" >> %t/InputsA/module.modulemap // RUN: %clang_cc1 -triple=x86_64-apple-macosx10.6 -DENABLE_DARWIN -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -x objective-c -I%t/InputsA -verify %s // expected-no-diagnostics @@ -32,9 +32,9 @@ #endif // RUN: mkdir %t/InputsB -// RUN: echo "module RequiresiOSSim {" >> %t/InputsB/module.map -// RUN: echo " requires iossimulator" >> %t/InputsB/module.map -// RUN: echo "}" >> %t/InputsB/module.map +// RUN: echo "module RequiresiOSSim {" >> %t/InputsB/module.modulemap +// RUN: echo " requires iossimulator" >> %t/InputsB/module.modulemap +// RUN: echo "}" >> %t/InputsB/module.modulemap // RUN: %clang_cc1 -triple=x86_64-apple-iossimulator -DENABLE_IOSSIM -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -x objective-c -I%t/InputsB %s -verify // RUN: %clang_cc1 -triple=x86_64-apple-ios-simulator -DENABLE_IOSSIM -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -x objective-c -I%t/InputsB %s -verify @@ -43,15 +43,15 @@ #endif // RUN: mkdir %t/InputsC -// RUN: echo "module RequiresLinuxEABIA {" >> %t/InputsC/module.map -// RUN: echo " requires linux, gnueabi" >> %t/InputsC/module.map -// RUN: echo "}" >> %t/InputsC/module.map -// RUN: echo "module RequiresLinuxEABIB {" >> %t/InputsC/module.map -// RUN: echo " requires gnueabi" >> %t/InputsC/module.map -// RUN: echo "}" >> %t/InputsC/module.map -// RUN: echo "module RequiresLinuxEABIC {" >> %t/InputsC/module.map -// RUN: echo " requires linux" >> %t/InputsC/module.map -// RUN: echo "}" >> %t/InputsC/module.map +// RUN: echo "module RequiresLinuxEABIA {" >> %t/InputsC/module.modulemap +// RUN: echo " requires linux, gnueabi" >> %t/InputsC/module.modulemap +// RUN: echo "}" >> %t/InputsC/module.modulemap +// RUN: echo "module RequiresLinuxEABIB {" >> %t/InputsC/module.modulemap +// RUN: echo " requires gnueabi" >> %t/InputsC/module.modulemap +// RUN: echo "}" >> %t/InputsC/module.modulemap +// RUN: echo "module RequiresLinuxEABIC {" >> %t/InputsC/module.modulemap +// RUN: echo " requires linux" >> %t/InputsC/module.modulemap +// RUN: echo "}" >> %t/InputsC/module.modulemap // RUN: %clang_cc1 -triple=armv8r-none-linux-gnueabi -DENABLE_LINUXEABI -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -x objective-c -I%t/InputsC %s -verify #ifdef ENABLE_LINUXEABI @@ -61,15 +61,15 @@ #endif // RUN: mkdir %t/InputsD -// RUN: echo "module RequiresWinMSVCA {" >> %t/InputsD/module.map -// RUN: echo " requires windows" >> %t/InputsD/module.map -// RUN: echo "}" >> %t/InputsD/module.map -// RUN: echo "module RequiresWinMSVCB {" >> %t/InputsD/module.map -// RUN: echo " requires windows, msvc" >> %t/InputsD/module.map -// RUN: echo "}" >> %t/InputsD/module.map -// RUN: echo "module RequiresWinMSVCC {" >> %t/InputsD/module.map -// RUN: echo " requires msvc" >> %t/InputsD/module.map -// RUN: echo "}" >> %t/InputsD/module.map +// RUN: echo "module RequiresWinMSVCA {" >> %t/InputsD/module.modulemap +// RUN: echo " requires windows" >> %t/InputsD/module.modulemap +// RUN: echo "}" >> %t/InputsD/module.modulemap +// RUN: echo "module RequiresWinMSVCB {" >> %t/InputsD/module.modulemap +// RUN: echo " requires windows, msvc" >> %t/InputsD/module.modulemap +// RUN: echo "}" >> %t/InputsD/module.modulemap +// RUN: echo "module RequiresWinMSVCC {" >> %t/InputsD/module.modulemap +// RUN: echo " requires msvc" >> %t/InputsD/module.modulemap +// RUN: echo "}" >> %t/InputsD/module.modulemap // RUN: %clang_cc1 -triple=thumbv7-unknown-windows-msvc -DENABLE_WINMSVC -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -x objective-c -I%t/InputsD %s -verify #ifdef ENABLE_WINMSVC diff --git a/clang/test/Modules/timestamps.c b/clang/test/Modules/timestamps.c index 5315750b81590..50fdce6302550 100644 --- a/clang/test/Modules/timestamps.c +++ b/clang/test/Modules/timestamps.c @@ -20,7 +20,7 @@ // CHECK-NEXT: // CHECK-NEXT: %t/Inputs/usr/include/module.map +// RUN: echo 'module Foo [system] { header "foo.h" }' > %t/Inputs/usr/include/module.modulemap //// // Build a module using a system header diff --git a/clang/test/PCH/modified-module-dependency.m b/clang/test/PCH/modified-module-dependency.m index 39fddb039bad6..44c14b3a0231c 100644 --- a/clang/test/PCH/modified-module-dependency.m +++ b/clang/test/PCH/modified-module-dependency.m @@ -2,7 +2,7 @@ // RUN: mkdir -p %t-dir // RUN: echo '@import test;' > %t-dir/prefix.h // RUN: echo 'void foo(void);' > %t-dir/test.h -// RUN: cp %S/modified-module-dependency.module.map %t-dir/module.map +// RUN: cp %S/modified-module-dependency.module.map %t-dir/module.modulemap // Precompile prefix.pch. // RUN: %clang_cc1 -x objective-c -I %t-dir -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-dir/cache -fdisable-module-hash -emit-pch %t-dir/prefix.h -o %t-dir/prefix.pch diff --git a/clang/test/Preprocessor/pragma_module.c b/clang/test/Preprocessor/pragma_module.c index c52d42537573f..2d86b989411fd 100644 --- a/clang/test/Preprocessor/pragma_module.c +++ b/clang/test/Preprocessor/pragma_module.c @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: echo 'module foo { module a {} module b {} } module bar {} module if {}' > %t/module.map -// RUN: %clang_cc1 -fmodules -fmodule-name=if -x c %t/module.map -emit-module -o %t/if.pcm -// RUN: %clang_cc1 -E -fmodules %s -fmodule-file=%t/if.pcm -verify -fmodule-name=foo -fmodule-map-file=%t/module.map -// RUN: %clang_cc1 -E -fmodules %s -fmodule-file=%t/if.pcm -verify -fmodule-name=foo -fmodule-map-file=%t/module.map -fmodules-local-submodule-visibility -DLOCAL_VIS +// RUN: echo 'module foo { module a {} module b {} } module bar {} module if {}' > %t/module.modulemap +// RUN: %clang_cc1 -fmodules -fmodule-name=if -x c %t/module.modulemap -emit-module -o %t/if.pcm +// RUN: %clang_cc1 -E -fmodules %s -fmodule-file=%t/if.pcm -verify -fmodule-name=foo -fmodule-map-file=%t/module.modulemap +// RUN: %clang_cc1 -E -fmodules %s -fmodule-file=%t/if.pcm -verify -fmodule-name=foo -fmodule-map-file=%t/module.modulemap -fmodules-local-submodule-visibility -DLOCAL_VIS // Just checking the syntax here; the semantics are tested elsewhere. #pragma clang module import // expected-error {{expected module name}} diff --git a/clang/test/SemaObjC/Inputs/module.map b/clang/test/SemaObjC/Inputs/module.modulemap similarity index 100% rename from clang/test/SemaObjC/Inputs/module.map rename to clang/test/SemaObjC/Inputs/module.modulemap diff --git a/clang/test/VFS/Inputs/vfsoverlay.yaml b/clang/test/VFS/Inputs/vfsoverlay.yaml index 504a1530d3c55..25ac53ea0ac77 100644 --- a/clang/test/VFS/Inputs/vfsoverlay.yaml +++ b/clang/test/VFS/Inputs/vfsoverlay.yaml @@ -9,7 +9,7 @@ { 'name': 'import_some_frame.h', 'type': 'file', 'external-contents': 'INPUT_DIR/import_some_frame.h' }, - { 'name': 'module.map', 'type': 'file', + { 'name': 'module.modulemap', 'type': 'file', 'external-contents': 'INPUT_DIR/actual_module.map' }, { 'name': 'include_real.h', 'type': 'file', diff --git a/clang/test/VFS/Inputs/vfsoverlay2.yaml b/clang/test/VFS/Inputs/vfsoverlay2.yaml index ae2a0ce4ec98f..f6ed2710941bd 100644 --- a/clang/test/VFS/Inputs/vfsoverlay2.yaml +++ b/clang/test/VFS/Inputs/vfsoverlay2.yaml @@ -3,7 +3,7 @@ 'roots': [ { 'name': 'OUT_DIR', 'type': 'directory', 'contents': [ - { 'name': 'module.map', 'type': 'file', + { 'name': 'module.modulemap', 'type': 'file', 'external-contents': 'INPUT_DIR/actual_module2.map' } ] diff --git a/clang/test/VFS/test_nonmodular.c b/clang/test/VFS/test_nonmodular.c index faec0e3a51623..c7acb74f5eca2 100644 --- a/clang/test/VFS/test_nonmodular.c +++ b/clang/test/VFS/test_nonmodular.c @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: mkdir -p %t/vdir %t/cache %t/outdir -// We can't have module.map inside Inputs/Nonmodular. +// We can't have module.modulemap inside Inputs/Nonmodular. // RUN: cp %S/Inputs/Nonmodular/Nonmodular.modulemap %t/outdir/module.modulemap // // RUN: sed -e "s@VDIR@%{/t:regex_replacement}/vdir@g" -e "s@IN_DIR@%{/S:regex_replacement}@g" -e "s@OUT_DIR@%{/t:regex_replacement}/outdir@g" %S/Inputs/Nonmodular/nonmodular-headers.yaml > %t/vdir/nonmodular-headers.yaml diff --git a/clang/unittests/Tooling/ToolingTest.cpp b/clang/unittests/Tooling/ToolingTest.cpp index 354af292a5410..2e3da2cd2a701 100644 --- a/clang/unittests/Tooling/ToolingTest.cpp +++ b/clang/unittests/Tooling/ToolingTest.cpp @@ -197,8 +197,8 @@ TEST(ToolInvocation, TestMapVirtualFile) { TEST(ToolInvocation, TestVirtualModulesCompilation) { // FIXME: Currently, this only tests that we don't exit with an error if a - // mapped module.map is found on the include path. In the future, expand this - // test to run a full modules enabled compilation, so we make sure we can + // mapped module.modulemap is found on the include path. In the future, expand + // this test to run a full modules enabled compilation, so we make sure we can // rerun modules compilations with a virtual file system. llvm::IntrusiveRefCntPtr OverlayFileSystem( new llvm::vfs::OverlayFileSystem(llvm::vfs::getRealFileSystem())); @@ -218,9 +218,9 @@ TEST(ToolInvocation, TestVirtualModulesCompilation) { "test.cpp", 0, llvm::MemoryBuffer::getMemBuffer("#include \n")); InMemoryFileSystem->addFile("def/abc", 0, llvm::MemoryBuffer::getMemBuffer("\n")); - // Add a module.map file in the include directory of our header, so we trigger - // the module.map header search logic. - InMemoryFileSystem->addFile("def/module.map", 0, + // Add a module.modulemap file in the include directory of our header, so we + // trigger the module.modulemap header search logic. + InMemoryFileSystem->addFile("def/module.modulemap", 0, llvm::MemoryBuffer::getMemBuffer("\n")); EXPECT_TRUE(Invocation.run()); }