File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
test/Interop/Cxx/ergonomics Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ add_custom_target("copy_cxxInterop_support_header"
57
57
DEPENDS "${SWIFTINC_DIR} /bridging"
58
58
COMMENT "Copying C++ interop support header to ${SWIFTINC_DIR} " )
59
59
60
- swift_install_in_component (FILES "${CMAKE_CURRENT_SOURCE_DIR} /bridging"
60
+ swift_install_in_component (FILES
61
+ "${CMAKE_CURRENT_SOURCE_DIR} /bridging"
62
+ "${CMAKE_CURRENT_SOURCE_DIR} /module.modulemap"
61
63
DESTINATION "include/swift"
62
64
COMPONENT compiler )
63
65
Original file line number Diff line number Diff line change
1
+ // ===------------------ module.modulemap - C++ and Swift module -*- C++ -*-===//
2
+ //
3
+ // This source file is part of the Swift.org open source project
4
+ //
5
+ // Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
6
+ // Licensed under Apache License v2.0 with Runtime Library Exception
7
+ //
8
+ // See https://swift.org/LICENSE.txt for license information
9
+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
+ //
11
+ // ===----------------------------------------------------------------------===//
12
+
13
+ module SwiftBridging {
14
+ header " bridging"
15
+
16
+ export *
17
+ }
Original file line number Diff line number Diff line change 5
5
6
6
// RUN: %target-swift-ide-test -print-module -module-to-print=SwiftMod -module-to-print=CxxModule -I %t -I %t/Inputs -I %swift_src_root/lib/ClangImporter -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
7
7
8
+ // RUN: %target-swift-ide-test -print-module -module-to-print=SwiftMod -module-to-print=CxxModule -I %t -I %t/Inputs -I %swift_src_root/lib/ClangImporter -source-filename=x -enable-experimental-cxx-interop -Xcc -DINCMOD | %FileCheck %s
9
+
8
10
//--- SwiftMod.swift
9
11
10
12
public protocol Proto {
@@ -21,7 +23,11 @@ module CxxModule {
21
23
// Note: in actuality, this will be included
22
24
// as <swift/bridging>, but in this test we include
23
25
// it directly.
26
+ #ifndef INCMOD
24
27
#include " bridging "
28
+ #else
29
+ #pragma clang module import SwiftBridging
30
+ #endif
25
31
26
32
class SELF_CONTAINED SelfContained {
27
33
public:
You can’t perform that action at this time.
0 commit comments