mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Rename module.map -> module.modulemap in tests
The legacy `module.map` spelling of module map files was deprecated by llvm/llvm-project#75142 and clang expects to remove support for them in the future. Switch all tests to use the supported spelling. Fixes rdar://128431478.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: split-file %s %t
|
||||
|
||||
// RUN: %target-swift-emit-pcm -module-name m -o %t/m.pcm -Xcc -Xclang -Xcc -fallow-pcm-with-compiler-errors -Xcc -Xclang -Xcc -fmodule-format=raw %t/mods/module.map
|
||||
// RUN: %target-swift-emit-pcm -module-name m -o %t/m.pcm -Xcc -Xclang -Xcc -fallow-pcm-with-compiler-errors -Xcc -Xclang -Xcc -fmodule-format=raw %t/mods/module.modulemap
|
||||
// RUN: %target-swift-frontend -typecheck -verify -Xcc -Xclang -Xcc -fallow-pcm-with-compiler-errors -Xcc -fmodule-file=%t/m.pcm %t/use.swift
|
||||
|
||||
//--- mods/module.map
|
||||
//--- mods/module.modulemap
|
||||
module m {
|
||||
header "m.h"
|
||||
}
|
||||
|
||||
@@ -113,8 +113,8 @@ module ImportAsMember {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: This probably ought to be in a module_private.map, but that causes
|
||||
// hundreds of clang warnings.
|
||||
// FIXME: This probably ought to be in a module.private.modulemap, but that
|
||||
// causes hundreds of clang warnings.
|
||||
module ImportAsMember_Private {
|
||||
export *
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// It is important that this test uses a second module.map file.
|
||||
// It is important that this test uses a second module.modulemap file.
|
||||
module ImportsMissingHeaderIndirect {
|
||||
header "ImportsMissingHeaderIndirect.h"
|
||||
export *
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -enable-objc-interop -emit-objc-header -o %t %S/Inputs/resolve-cross-language/Base.swift -disable-objc-attr-requires-foundation-module
|
||||
// RUN: cp %S/Inputs/resolve-cross-language/Base-module.map %t/module.modulemap
|
||||
// RUN: cp %S/Inputs/resolve-cross-language/Base.modulemap %t/module.modulemap
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -typecheck -I %t -F %clang-importer-sdk-path/frameworks -F %S/Inputs/resolve-cross-language %s -verify
|
||||
|
||||
import Base
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{
|
||||
'name': 'OUT_DIR', 'type': 'directory',
|
||||
'contents': [
|
||||
{ 'name': 'module.map', 'type': 'file',
|
||||
{ 'name': 'module.modulemap', 'type': 'file',
|
||||
'external-contents': 'INPUT_DIR/vfs/a-modulemap'
|
||||
},
|
||||
{ 'name': 'VFSMappedModule.h', 'type': 'file',
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ASwiftType {
|
||||
// CHECKA: key.modulename: "LibA"
|
||||
// CHECKA: key.decl_lang: source.lang.swift
|
||||
|
||||
//--- frameworks/LibA.framework/module.map
|
||||
//--- frameworks/LibA.framework/Modules/module.modulemap
|
||||
framework module LibA {
|
||||
header "LibA.h"
|
||||
export *
|
||||
@@ -113,7 +113,7 @@ public class CType {}
|
||||
// CHECKD: key.modulename: "LibD"
|
||||
// CHECKD: key.decl_lang: source.lang.objc
|
||||
|
||||
//--- mods/module.map
|
||||
//--- mods/module.modulemap
|
||||
module LibD {
|
||||
header "LibD.h"
|
||||
export *
|
||||
|
||||
@@ -22,7 +22,7 @@ public protocol SwiftProto {
|
||||
@objc optional func swiftReq()
|
||||
}
|
||||
|
||||
//--- frameworks/OptionalRequirementOf.framework/module.map
|
||||
//--- frameworks/OptionalRequirementOf.framework/Modules/module.modulemap
|
||||
framework module OptionalRequirementOf {
|
||||
header "req.h"
|
||||
export *
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//===--- module.map -------------------------------------------------------===//
|
||||
//===--- module.modulemap -------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//===--- module.map -------------------------------------------------------===//
|
||||
//===--- module.modulemap -------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//===--- module.map -------------------------------------------------------===//
|
||||
//===--- module.modulemap -------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-build-swift -emit-library -emit-module -o %t/libfirst.dylib -emit-objc-header-path %t/first.h %S/Inputs/class-stubs-from-objc/first.swift -Xlinker -install_name -Xlinker @executable_path/libfirst.dylib -enable-library-evolution
|
||||
// RUN: %target-build-swift -emit-library -o %t/libsecond.dylib -emit-objc-header-path %t/second.h -I %t %S/Inputs/class-stubs-from-objc/second.swift -Xlinker -install_name -Xlinker @executable_path/libsecond.dylib -lfirst -L %t -target %target-next-stable-abi-triple
|
||||
// RUN: cp %S/Inputs/class-stubs-from-objc/module.map %t/
|
||||
// RUN: cp %S/Inputs/class-stubs-from-objc/module.modulemap %t/
|
||||
// RUN: xcrun -sdk %sdk %clang %s -I %t -L %t -fmodules -fobjc-arc -o %t/main -lfirst -lsecond -target %target-next-stable-abi-triple
|
||||
// RUN: %target-codesign %t/main %t/libfirst.dylib %t/libsecond.dylib
|
||||
// RUN: %target-run %t/main %t/libfirst.dylib %t/libsecond.dylib
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-build-swift -emit-library -emit-module -o %t/libfirst.dylib -emit-objc-header-path %t/first.h %S/Inputs/class-stubs-weak/first.swift -Xlinker -install_name -Xlinker @executable_path/libfirst.dylib -enable-library-evolution
|
||||
// RUN: %target-build-swift -emit-library -o %t/libsecond.dylib -emit-objc-header-path %t/second.h -I %t %S/Inputs/class-stubs-weak/second.swift -Xlinker -install_name -Xlinker @executable_path/libsecond.dylib -lfirst -L %t -target %target-next-stable-abi-triple -DBEFORE
|
||||
// RUN: cp %S/Inputs/class-stubs-weak/module.map %t/
|
||||
// RUN: cp %S/Inputs/class-stubs-weak/module.modulemap %t/
|
||||
|
||||
// Note: This is the just-built Clang, not the system Clang.
|
||||
// RUN: xcrun -sdk %sdk %clang %s -I %t -L %t -fmodules -fobjc-arc -o %t/main -lfirst -lsecond -target %target-triple
|
||||
|
||||
Reference in New Issue
Block a user