File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -2564,7 +2564,7 @@ void IRGenModule::emitSILFunction(SILFunction *f) {
2564
2564
return ;
2565
2565
2566
2566
// Type metadata for foreign references is not yet supported on Windows. Bug #76168.
2567
- if (Context.LangOpts .EnableCXXInterop &&
2567
+ if (Context.LangOpts .EnableCXXInterop && !Context. LangOpts . hasFeature (Feature::Embedded) &&
2568
2568
f->getLinkage () == SILLinkage::Public &&
2569
2569
!Context.LangOpts .Target .isOSWindows ())
2570
2570
noteUseOfMetadataByCXXInterop (IRGen, f, TypeExpansionContext (*f));
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %{python} %utils/split_file.py -o %t %s
3
+
4
+ // RUN: %target-swift-frontend -I %t %t/Main.swift -enable-experimental-feature Embedded -cxx-interoperability-mode=default -c -o %t/a.o -Rmodule-loading
5
+
6
+ // REQUIRES: swift_in_compiler
7
+ // REQUIRES: OS=macosx || OS=linux-gnu
8
+ // REQUIRES: swift_feature_Embedded
9
+
10
+ // BEGIN header.h
11
+
12
+ // C++
13
+ struct CxxStruct {
14
+ int field;
15
+ } ;
16
+
17
+ // BEGIN module.modulemap
18
+
19
+ module MyModule {
20
+ header " header.h "
21
+ }
22
+
23
+ // BEGIN Main.swift
24
+
25
+ import MyModule
26
+
27
+ public func foo( ptr: UnsafeMutablePointer < CxxStruct > ? ) {
28
+ }
29
+
30
+ foo ( ptr: nil )
You can’t perform that action at this time.
0 commit comments