Skip to content

Commit fdd7548

Browse files
authored
Merge pull request #1850 from swiftwasm/main
[pull] swiftwasm from main
2 parents afb0d50 + b03457d commit fdd7548

16 files changed

+27
-27
lines changed

test/Interop/Cxx/templates/Inputs/decl-with-definition-including-members.h renamed to test/Interop/Cxx/templates/Inputs/fully-pre-defined-class-template.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ inline int forceInstantiation() {
2121
// because function above forced the instantiation. Its members are fully
2222
// instantiated, so nothing needs to be explicitly instantiated by the Swift
2323
// compiler.
24-
typedef MagicWrapper<IntWrapper> FullyDefinedMagicallyWrappedInt;
24+
typedef MagicWrapper<IntWrapper> FullyPreDefinedMagicallyWrappedInt;
2525

2626
#endif // TEST_INTEROP_CXX_TEMPLATES_INPUTS_DECL_WITH_DEFINITION_INCLUDING_MEMBERS_H

test/Interop/Cxx/templates/Inputs/module.modulemap

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
module DeclWithPrimitiveArgument {
2-
header "decl-with-primitive-argument.h"
1+
module ClassTemplateWithPrimitiveArgument {
2+
header "class-template-with-primitive-argument.h"
33
}
44

5-
module DeclWithoutDefinition {
6-
header "decl-without-definition.h"
5+
module NotPreDefinedClassTemplate {
6+
header "not-pre-defined-class-template.h"
77
}
88

9-
module DeclWithDefinition {
10-
header "decl-with-definition.h"
9+
module PartiallyPreDefinedClassTemplate {
10+
header "partially-pre-defined-class-template.h"
1111
}
1212

13-
module DeclWithDefinitionIncludingMembers {
14-
header "decl-with-definition-including-members.h"
13+
module FullyPreDefinedClassTemplate {
14+
header "fully-pre-defined-class-template.h"
1515
}
1616

1717
module CanonicalTypes {
1818
header "canonical-types.h"
1919
}
2020

21-
module ExplicitSpecialization {
22-
header "explicit-specialization.h"
21+
module ExplicitClassSpecialization {
22+
header "explicit-class-specialization.h"
2323
}
2424

2525
module UsingDirective {
2626
header "using-directive.h"
2727
}
2828

29-
module EagerInstantiationProblems {
30-
header "eager-instantiation-problems.h"
29+
module ClassTemplateEagerInstantiationProblems {
30+
header "class-template-eager-instantiation-problems.h"
3131
}
3232

3333
module Mangling {

test/Interop/Cxx/templates/Inputs/decl-with-definition.h renamed to test/Interop/Cxx/templates/Inputs/partially-pre-defined-class-template.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ inline MagicWrapper<IntWrapper> forceInstantiation() {
1919
// The ClassTemplateSpecializationDecl node for MagicWrapper<IntWrapper> already has a definition
2020
// because function above forced the instantiation. Its members are not
2121
// instantiated though, the Swift compiler needs to instantiate them.
22-
typedef MagicWrapper<IntWrapper> PartiallyDefinedMagicallyWrappedInt;
22+
typedef MagicWrapper<IntWrapper> PartiallyPreDefinedMagicallyWrappedInt;
2323

2424
#endif // TEST_INTEROP_CXX_TEMPLATES_INPUTS_DECL_WITH_DEFINITION_H

test/Interop/Cxx/templates/eager-instatiation-problems.swift renamed to test/Interop/Cxx/templates/class-template-eager-instatiation-problems.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// REQUIRES: executable_test
44

5-
import EagerInstantiationProblems
5+
import ClassTemplateEagerInstantiationProblems
66
import StdlibUnittest
77

88
var TemplatesTestSuite = TestSuite("TemplatesTestSuite")

test/Interop/Cxx/templates/decl-with-primitive-argument.swift renamed to test/Interop/Cxx/templates/class-template-with-primitive-argument.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// REQUIRES: executable_test
44

5-
import DeclWithPrimitiveArgument
5+
import ClassTemplateWithPrimitiveArgument
66
import StdlibUnittest
77

88
var TemplatesTestSuite = TestSuite("TemplatesTestSuite")

test/Interop/Cxx/templates/explicit-specialization.swift renamed to test/Interop/Cxx/templates/explicit-class-specialization.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// REQUIRES: executable_test
44

5-
import ExplicitSpecialization
5+
import ExplicitClassSpecialization
66
import StdlibUnittest
77

88
var TemplatesTestSuite = TestSuite("TemplatesTestSuite")

test/Interop/Cxx/templates/decl-with-definition-including-members.swift renamed to test/Interop/Cxx/templates/fully-pre-defined-class-template.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
//
33
// REQUIRES: executable_test
44

5-
import DeclWithDefinitionIncludingMembers
5+
import FullyPreDefinedClassTemplate
66
import StdlibUnittest
77

88
var TemplatesTestSuite = TestSuite("TemplatesTestSuite")
99

1010
TemplatesTestSuite.test("fully-defined") {
1111
let myInt = IntWrapper(value: 10)
12-
var magicInt = FullyDefinedMagicallyWrappedInt(t: myInt)
12+
var magicInt = FullyPreDefinedMagicallyWrappedInt(t: myInt)
1313
expectEqual(magicInt.getValuePlusArg(5), 15)
1414
}
1515

test/Interop/Cxx/templates/decl-without-definition-module-interface.swift renamed to test/Interop/Cxx/templates/not-pre-defined-class-template-module-interface.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-ide-test -print-module -module-to-print=DeclWithoutDefinition -I %S/Inputs -source-filename=x -enable-cxx-interop | %FileCheck %s
1+
// RUN: %target-swift-ide-test -print-module -module-to-print=NotPreDefinedClassTemplate -I %S/Inputs -source-filename=x -enable-cxx-interop | %FileCheck %s
22

33
// CHECK: struct __CxxTemplateInst12MagicWrapperI10IntWrapperE {
44
// CHECK: var t: IntWrapper

test/Interop/Cxx/templates/decl-without-definition.swift renamed to test/Interop/Cxx/templates/not-pre-defined-class-template.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// REQUIRES: executable_test
44

5-
import DeclWithoutDefinition
5+
import NotPreDefinedClassTemplate
66
import StdlibUnittest
77

88
var TemplatesTestSuite = TestSuite("TemplatesTestSuite")

test/Interop/Cxx/templates/decl-with-definition-irgen.swift renamed to test/Interop/Cxx/templates/partially-pre-defined-class-template-irgen.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-cxx-interop | %FileCheck %s
22
// REQUIRES: rdar67257133
3-
import DeclWithDefinition
3+
import PartiallyPreDefinedClassTemplate
44

55
public func getWrappedMagicInt() -> CInt {
66
let myInt = IntWrapper(value: 7)
7-
var magicInt = PartiallyDefinedMagicallyWrappedInt(t: myInt)
7+
var magicInt = PartiallyPreDefinedMagicallyWrappedInt(t: myInt)
88
return magicInt.getValuePlusArg(13)
99
}
1010

test/Interop/Cxx/templates/decl-with-definition-silgen.swift renamed to test/Interop/Cxx/templates/partially-pre-defined-class-template-silgen.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %target-swift-emit-sil %s -I %S/Inputs -enable-cxx-interop | %FileCheck %s
22

3-
import DeclWithDefinition
3+
import PartiallyPreDefinedClassTemplate
44

55
public func getWrappedMagicInt() -> CInt {
66
let myInt = IntWrapper(value: 21)
7-
var magicInt = PartiallyDefinedMagicallyWrappedInt(t: myInt)
7+
var magicInt = PartiallyPreDefinedMagicallyWrappedInt(t: myInt)
88
return magicInt.getValuePlusArg(32)
99
}
1010

test/Interop/Cxx/templates/decl-with-definition.swift renamed to test/Interop/Cxx/templates/partially-pre-defined-class-template.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
//
33
// REQUIRES: executable_test
44

5-
import DeclWithDefinition
5+
import PartiallyPreDefinedClassTemplate
66
import StdlibUnittest
77

88
var TemplatesTestSuite = TestSuite("TemplatesTestSuite")
99

1010
TemplatesTestSuite.test("has-partial-definition") {
1111
let myInt = IntWrapper(value: 32)
12-
var magicInt = PartiallyDefinedMagicallyWrappedInt(t: myInt)
12+
var magicInt = PartiallyPreDefinedMagicallyWrappedInt(t: myInt)
1313
expectEqual(magicInt.getValuePlusArg(5), 37)
1414
}
1515

0 commit comments

Comments
 (0)