Skip to content

Commit ebaf0b6

Browse files
committed
SILGen: remove duplicated module declaration
This module was specified in the IDE and SILGen testing module maps, which causes a failure. Remove the duplicated declaration in the SILGen inputs and use IDE's definition.
1 parent bc27395 commit ebaf0b6

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

test/IDE/Inputs/custom-modules/Newtype.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,6 @@ extern void mutate_TRefRef(_Null_unspecified TRefRef* _Null_unspecified)
128128
__attribute((swift_name("TRefRef.mutate(self:)")));
129129
extern void use_ConstTRef(_Null_unspecified ConstTRefRef)
130130
__attribute((swift_name("ConstTRefRef.use(self:)")));
131+
132+
typedef NSString *MyString __attribute__((__swift_newtype__(struct)));
133+

test/SILGen/Inputs/usr/include/module.map

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ module objc_extensions_helper {
3535
header "objc_extensions_helper.h"
3636
}
3737

38-
module Newtype {
39-
header "newtype.h"
40-
export *
41-
}
42-
4338
module NonNilTest {
4439
header "NonNilTest.h"
4540
export *

test/SILGen/newtype.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
2-
// RUN: %target-swift-emit-silgen -module-name newtype -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s -check-prefix=CHECK-RAW
3-
4-
// RUN: %target-swift-emit-sil -module-name newtype -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s -check-prefix=CHECK-CANONICAL
1+
// RUN: %empty-directory(%t)
2+
// RUN: %build-silgen-test-overlays
3+
// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk -I %t) -module-name newtype -I %S/Inputs -I %S/Inputs -I %S/../IDE/Inputs/custom-modules -enable-objc-interop -enable-source-import %s | %FileCheck %s -check-prefix=CHECK-RAW
4+
// RUN: %target-swift-emit-sil(mock-sdk: %clang-importer-sdk -I %t) -module-name newtype -I %S/Inputs -I %S/Inputs -I %S/../IDE/Inputs/custom-modules -enable-objc-interop -enable-source-import %s | %FileCheck %s -check-prefix=CHECK-CANONICAL
55

66
// REQUIRES: objc_interop
77

0 commit comments

Comments
 (0)