Skip to content

Commit 2db0b93

Browse files
committed
[cxx-interop] Use fully-qualified type names of C++ template parameters
When importing C++ class template instantiations, Swift generates a type name for each instantiation. The generated names must be unique, since they are used for mangling. If multiple different C++ types declare nested types with the same name, which are then used as template arguments, Swift was generating the same name for those template instantiations (e.g. `shared_ptr<Impl>` for different `Impl` types). This change makes sure we use fully-qualified type names of template parameters when generating Swift type names for class template instantiations (e.g. `shared_ptr<MyNamespace.MyClass.Impl>`). This fixes an assertion failure coming out of IRGen: ``` Assertion failed: (Buffer.empty() && "didn't claim all values out of buffer"), function ~ConstantInitBuilderBase, file ConstantInitBuilder.h, line 75. ``` rdar://141962480 (cherry picked from commit e5899ee)
1 parent b8ea6cf commit 2db0b93

15 files changed

+123
-31
lines changed

lib/ClangImporter/ClangClassTemplateNamePrinter.cpp

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,31 @@ struct TemplateInstantiationNamePrinter
5959
namedArg = typeDefDecl;
6060
llvm::SmallString<128> storage;
6161
llvm::raw_svector_ostream buffer(storage);
62-
nameImporter->importName(namedArg, version, clang::DeclarationName())
63-
.getDeclName()
64-
.print(buffer);
62+
63+
// Print the fully-qualified type name.
64+
std::vector<DeclName> qualifiedNameComponents;
65+
auto unqualifiedName = nameImporter->importName(namedArg, version);
66+
qualifiedNameComponents.push_back(unqualifiedName.getDeclName());
67+
const clang::DeclContext *parentCtx =
68+
unqualifiedName.getEffectiveContext().getAsDeclContext();
69+
while (parentCtx) {
70+
if (auto namedParentDecl = dyn_cast<clang::NamedDecl>(parentCtx)) {
71+
// If this component of the fully-qualified name is a decl that is
72+
// imported into Swift, remember its name.
73+
auto componentName =
74+
nameImporter->importName(namedParentDecl, version);
75+
qualifiedNameComponents.push_back(componentName.getDeclName());
76+
parentCtx = componentName.getEffectiveContext().getAsDeclContext();
77+
} else {
78+
// If this component is not imported into Swift, skip it.
79+
parentCtx = parentCtx->getParent();
80+
}
81+
}
82+
83+
llvm::interleave(
84+
llvm::reverse(qualifiedNameComponents),
85+
[&](const DeclName &each) { each.print(buffer); },
86+
[&]() { buffer << "."; });
6587
return buffer.str().str();
6688
}
6789
return "_";

test/Interop/Cxx/objc-correctness/init-String-with-NSString-utf8String.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import CxxStdlib
77

88
// CHECK: @"\01L_selector(UTF8String)"
99
// CHECK: @objc_msgSend
10-
// CHECK: call swiftcc void @"$sSo3stdO3__1O0071basic_stringCCharchar_traitsCCharallocatorCChar_mHGHsqaGJcraCCfsaqChraaV9CxxStdlibEyAFSPys4Int8VGSgcfC"
10+
// CHECK: call swiftcc void @"$sSo3stdO3__1O0088basic_stringCCharstd__1char_traitsCCharstd__1allocatorCChar_cyHBywaEDexaCidvdFCgAayGjzaaV9CxxStdlibEyAFSPys4Int8VGSgcfC"
1111

1212
let ObjCStr: NSString = "hello"
1313
let CxxStr = std.string(ObjCStr.utf8String) // Should not crash here

test/Interop/Cxx/stdlib/libcxx-module-interface.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020

2121
// CHECK-IOSFWD: enum std {
2222
// CHECK-IOSFWD: enum __1 {
23-
// CHECK-IOSFWD: struct basic_string<CChar, char_traits<CChar>, allocator<CChar>> : CxxMutableRandomAccessCollection {
23+
// CHECK-IOSFWD: struct basic_string<CChar, std.__1.char_traits<CChar>, std.__1.allocator<CChar>> : CxxMutableRandomAccessCollection {
2424
// CHECK-IOSFWD: typealias value_type = CChar
2525
// CHECK-IOSFWD: }
26-
// CHECK-IOSFWD: struct basic_string<CWideChar, char_traits<CWideChar>, allocator<CWideChar>> : CxxMutableRandomAccessCollection {
26+
// CHECK-IOSFWD: struct basic_string<CWideChar, std.__1.char_traits<CWideChar>, std.__1.allocator<CWideChar>> : CxxMutableRandomAccessCollection {
2727
// CHECK-IOSFWD: typealias value_type = CWideChar
2828
// CHECK-IOSFWD: }
29-
// CHECK-IOSFWD: typealias string = std.__1.basic_string<CChar, char_traits<CChar>, allocator<CChar>>
30-
// CHECK-IOSFWD: typealias wstring = std.__1.basic_string<CWideChar, char_traits<CWideChar>, allocator<CWideChar>>
29+
// CHECK-IOSFWD: typealias string = std.__1.basic_string<CChar, std.__1.char_traits<CChar>, std.__1.allocator<CChar>>
30+
// CHECK-IOSFWD: typealias wstring = std.__1.basic_string<CWideChar, std.__1.char_traits<CWideChar>, std.__1.allocator<CWideChar>>
3131
// CHECK-IOSFWD: }
3232
// CHECK-IOSFWD: }
3333
// CHECK-IOSFWD-NOT: enum std

test/Interop/Cxx/stdlib/libstdcxx-module-interface.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
// REQUIRES: OS=linux-gnu
1212

1313
// CHECK-STD: enum std {
14-
// CHECK-STRING: struct basic_string<CChar, char_traits<CChar>, allocator<CChar>> : CxxMutableRandomAccessCollection {
14+
// CHECK-STRING: struct basic_string<CChar, std{{(.__cxx11)?}}.char_traits<CChar>, std{{(.__cxx11)?}}.allocator<CChar>> : CxxMutableRandomAccessCollection {
1515
// CHECK-STRING: typealias value_type = std.char_traits<CChar>.char_type
1616
// CHECK-STRING: }
17-
// CHECK-STRING: struct basic_string<CWideChar, char_traits<CWideChar>, allocator<CWideChar>> : CxxMutableRandomAccessCollection {
17+
// CHECK-STRING: struct basic_string<CWideChar, std{{(.__cxx11)?}}.char_traits<CWideChar>, std{{(.__cxx11)?}}.allocator<CWideChar>> : CxxMutableRandomAccessCollection {
1818
// CHECK-STRING: typealias value_type = std.char_traits<CWideChar>.char_type
1919
// CHECK-STRING: }
2020

@@ -23,6 +23,6 @@
2323

2424
// CHECK-SIZE-T: typealias size_t = Int
2525

26-
// CHECK-STRING: typealias string = std{{(.__cxx11)?}}.basic_string<CChar, char_traits<CChar>, allocator<CChar>>
27-
// CHECK-STRING: typealias wstring = std{{(.__cxx11)?}}.basic_string<CWideChar, char_traits<CWideChar>, allocator<CWideChar>>
26+
// CHECK-STRING: typealias string = std{{(.__cxx11)?}}.basic_string<CChar, std{{(.__cxx11)?}}.char_traits<CChar>, std{{(.__cxx11)?}}.allocator<CChar>>
27+
// CHECK-STRING: typealias wstring = std{{(.__cxx11)?}}.basic_string<CWideChar, std{{(.__cxx11)?}}.char_traits<CWideChar>, std{{(.__cxx11)?}}.allocator<CWideChar>>
2828
// CHECK-STD: }

test/Interop/Cxx/stdlib/msvcprt-module-interface.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
// CHECK-STRING: typealias size_t = size_t
1313
// CHECK-STRING: static func to_string(_ _Val: Int32) -> std.string
1414
// CHECK-STRING: static func to_wstring(_ _Val: Int32) -> std.wstring
15-
// CHECK-STRING: struct basic_string<CChar, char_traits<CChar>, allocator<CChar>> : CxxRandomAccessCollection {
15+
// CHECK-STRING: struct basic_string<CChar, std.char_traits<CChar>, std.allocator<CChar>> : CxxRandomAccessCollection {
1616
// CHECK-STRING: typealias value_type = CChar
1717
// CHECK-STRING: }
18-
// CHECK-STRING: struct basic_string<CWideChar, char_traits<CWideChar>, allocator<CWideChar>> : CxxRandomAccessCollection {
18+
// CHECK-STRING: struct basic_string<CWideChar, std.char_traits<CWideChar>, std.allocator<CWideChar>> : CxxRandomAccessCollection {
1919
// CHECK-STRING: typealias value_type = CWideChar
2020
// CHECK-STRING: }
21-
// CHECK-STRING: typealias string = std.basic_string<CChar, char_traits<CChar>, allocator<CChar>>
22-
// CHECK-STRING: typealias wstring = std.basic_string<CWideChar, char_traits<CWideChar>, allocator<CWideChar>>
21+
// CHECK-STRING: typealias string = std.basic_string<CChar, std.char_traits<CChar>, std.allocator<CChar>>
22+
// CHECK-STRING: typealias wstring = std.basic_string<CWideChar, std.char_traits<CWideChar>, std.allocator<CWideChar>>
2323
// CHECK-STRING: }
2424

test/Interop/Cxx/stdlib/use-cxxstdlib-types-in-module-interface.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public:
4040
std::vector<SimplePOD * _Nullable> getMutPODPtrItems() const;
4141
};
4242

43-
// CHECK: func getPODItems() -> std{{\.__(ndk)?1\.|\.}}vector<SimplePOD, allocator<SimplePOD>>
44-
// CHECK: func getFRTItems() -> std{{\.__(ndk)?1\.|\.}}vector<FRTType, allocator<FRTType>>
45-
// CHECK: func getPODPtrItems() -> std{{\.__(ndk)?1\.|\.}}vector<UnsafePointer<SimplePOD>, allocator<UnsafePointer<SimplePOD>>>
46-
// CHECK: func getMutPODPtrItems() -> std{{\.__(ndk)?1\.|\.}}vector<UnsafeMutablePointer<SimplePOD>, allocator<UnsafeMutablePointer<SimplePOD>>>
43+
// CHECK: func getPODItems() -> std{{\.__(ndk)?1\.|\.}}vector<SimplePOD, std{{\.__(ndk)?1\.|\.}}allocator<SimplePOD>>
44+
// CHECK: func getFRTItems() -> std{{\.__(ndk)?1\.|\.}}vector<FRTType, std{{\.__(ndk)?1\.|\.}}allocator<FRTType>>
45+
// CHECK: func getPODPtrItems() -> std{{\.__(ndk)?1\.|\.}}vector<UnsafePointer<SimplePOD>, std{{\.__(ndk)?1\.|\.}}allocator<UnsafePointer<SimplePOD>>>
46+
// CHECK: func getMutPODPtrItems() -> std{{\.__(ndk)?1\.|\.}}vector<UnsafeMutablePointer<SimplePOD>, std{{\.__(ndk)?1\.|\.}}allocator<UnsafeMutablePointer<SimplePOD>>>

test/Interop/Cxx/templates/Inputs/class-template-in-namespace.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@ template <class T, class... Args> struct Ship<T(Args...)> {};
88

99
using Orbiter = Ship<void(bool)>;
1010

11+
template <class T>
12+
struct Box {
13+
T value;
14+
};
15+
16+
using IntBoxWithinNS = Box<int>;
17+
using BoxOfIntBoxWithinNS = Box<Box<int>>;
18+
19+
namespace NestedNS1 {
20+
struct Impl {};
21+
using ImplBox1 = Box<Impl>;
22+
}
23+
24+
namespace NestedNS2 {
25+
struct Impl {};
26+
using ImplBox2 = Box<Impl>;
27+
}
28+
1129
} // namespace Space
1230

1331
#endif // TEST_INTEROP_CXX_TEMPLATES_INPUTS_CLASS_TEMPLATE_IN_NAMESPACE_H

test/Interop/Cxx/templates/Inputs/member-templates.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@ struct HasTemplatedField {
5050
MyTemplatedStruct<int> x;
5151
};
5252

53+
struct HasNestedInstantiation {
54+
template <typename T>
55+
struct MyNestedTemplatedStruct {};
56+
57+
using NestedInst = MyTemplatedStruct<MyNestedTemplatedStruct<int>>;
58+
};
59+
60+
namespace NS {
61+
struct HasNestedInstantiation {
62+
template <typename T>
63+
struct MyNestedTemplatedStruct {};
64+
65+
using NestedInst = MyTemplatedStruct<MyNestedTemplatedStruct<int>>;
66+
};
67+
}
68+
5369
template <typename A, typename R = TemplateClassWithMemberTemplates<A>>
5470
struct HasUninstantiatableTemplateMember {
5571
R *pointer; // R cannot be instantiated here, because R is an incomplete type,

test/Interop/Cxx/templates/class-template-in-namespace-module-interface.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,16 @@
55
// CHECK: struct Ship<> {
66
// CHECK: }
77
// CHECK: typealias Orbiter = Space.Ship<((CBool) -> Void)>
8+
9+
// CHECK: typealias IntBoxWithinNS = Space.Box<CInt>
10+
// CHECK: typealias BoxOfIntBoxWithinNS = Space.Box<Space.Box<CInt>>
11+
12+
// CHECK: enum NestedNS1 {
13+
// CHECK: typealias ImplBox1 = Space.Box<Space.NestedNS1.Impl>
14+
// CHECK: }
15+
16+
// CHECK: enum NestedNS2 {
17+
// CHECK: typealias ImplBox2 = Space.Box<Space.NestedNS2.Impl>
18+
// CHECK: }
19+
820
// CHECK: }
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: %target-typecheck-verify-swift -cxx-interoperability-mode=default -I %S/Inputs
2+
3+
import ClassTemplateInNamespace
4+
5+
let _ = Space.NestedNS1.ImplBox1(value: Space.NestedNS1.Impl())
6+
let _ = Space.NestedNS2.ImplBox2(value: Space.NestedNS2.Impl())
7+
8+
let _ = Space.NestedNS1.ImplBox1(value: Space.NestedNS2.Impl()) // expected-error {{cannot convert value of type 'Space.NestedNS2.Impl' to expected argument type 'Space.NestedNS1.Impl'}}
9+
let _ = Space.NestedNS2.ImplBox2(value: Space.NestedNS1.Impl()) // expected-error {{cannot convert value of type 'Space.NestedNS1.Impl' to expected argument type 'Space.NestedNS2.Impl'}}

test/Interop/Cxx/templates/large-class-templates-module-interface.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
// TODO: we should not be importing functions that use this type in their
1414
// signature (such as the function below).
15-
// CHECK: mutating func test1() -> RegressionTest.ValExpr<SliceExpr<SliceExpr<Array<CInt>, _CInt_1>, _CInt_1>>
15+
// CHECK: mutating func test1() -> RegressionTest.ValExpr<RegressionTest.SliceExpr<RegressionTest.SliceExpr<RegressionTest.Array<CInt>, _CInt_1>, _CInt_1>>

test/Interop/Cxx/templates/member-templates-module-interface.swift

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,27 @@
3636
// CHECK: var x: MyTemplatedStruct<CInt>
3737
// CHECK: }
3838

39-
// CHECK: struct HasUninstantiatableTemplateMember<NoDefinition, TemplateClassWithMemberTemplates<NoDefinition>> {
39+
// CHECK: struct HasNestedInstantiation {
40+
// CHECK: struct MyNestedTemplatedStruct<T> {
41+
// CHECK: }
42+
// CHECK: typealias NestedInst = MyTemplatedStruct<HasNestedInstantiation.MyNestedTemplatedStruct<CInt>>
43+
// CHECK: }
44+
45+
// CHECK: enum NS {
46+
// CHECK: struct HasNestedInstantiation {
47+
// CHECK: struct MyNestedTemplatedStruct<T> {
48+
// CHECK: }
49+
// CHECK: typealias NestedInst = MyTemplatedStruct<NS.HasNestedInstantiation.MyNestedTemplatedStruct<CInt>>
50+
// CHECK: }
51+
// CHECK: }
52+
53+
54+
// CHECK: struct HasUninstantiatableTemplateMember<HasTemplateInstantiationWithForwardDecl.NoDefinition, TemplateClassWithMemberTemplates<HasTemplateInstantiationWithForwardDecl.NoDefinition>> {
4055
// CHECK: init(pointer: OpaquePointer!)
4156
// CHECK: var pointer: OpaquePointer!
4257
// CHECK: }
4358

4459
// CHECK: struct HasTemplateInstantiationWithForwardDecl {
45-
// CHECK: init(noDefMember: HasUninstantiatableTemplateMember<NoDefinition, TemplateClassWithMemberTemplates<NoDefinition>>)
46-
// CHECK: var noDefMember: HasUninstantiatableTemplateMember<NoDefinition, TemplateClassWithMemberTemplates<NoDefinition>>
60+
// CHECK: init(noDefMember: HasUninstantiatableTemplateMember<HasTemplateInstantiationWithForwardDecl.NoDefinition, TemplateClassWithMemberTemplates<HasTemplateInstantiationWithForwardDecl.NoDefinition>>)
61+
// CHECK: var noDefMember: HasUninstantiatableTemplateMember<HasTemplateInstantiationWithForwardDecl.NoDefinition, TemplateClassWithMemberTemplates<HasTemplateInstantiationWithForwardDecl.NoDefinition>>
4762
// CHECK: }

test/Interop/CxxToSwiftToCxx/bridge-cxx-struct-back-to-cxx.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public struct Strct {
246246
// CHECK-NEXT: namespace _impl {
247247
// CHECK-EMPTY:
248248
// CHECK-NEXT: // Type metadata accessor for NonTrivialTemplateTrivial
249-
// CHECK-NEXT: SWIFT_EXTERN swift::_impl::MetadataResponseTy $sSo2nsO0037NonTrivialTemplateTrivialinNS_CsGGkdcVMa(swift::_impl::MetadataRequestTy) SWIFT_NOEXCEPT SWIFT_CALL;
249+
// CHECK-NEXT: SWIFT_EXTERN swift::_impl::MetadataResponseTy $sSo2nsO0042NonTrivialTemplatensTrivialinNS_HlGFlenawcVMa(swift::_impl::MetadataRequestTy) SWIFT_NOEXCEPT SWIFT_CALL;
250250
// CHECK-EMPTY:
251251
// CHECK-EMPTY:
252252
// CHECK-NEXT: } // namespace _impl
@@ -258,7 +258,7 @@ public struct Strct {
258258
// CHECK-NEXT: template<>
259259
// CHECK-NEXT: struct TypeMetadataTrait<ns::NonTrivialTemplateTrivial> {
260260
// CHECK-NEXT: static SWIFT_INLINE_PRIVATE_HELPER void * _Nonnull getTypeMetadata() {
261-
// CHECK-NEXT: return _impl::$sSo2nsO0037NonTrivialTemplateTrivialinNS_CsGGkdcVMa(0)._0;
261+
// CHECK-NEXT: return _impl::$sSo2nsO0042NonTrivialTemplatensTrivialinNS_HlGFlenawcVMa(0)._0;
262262
// CHECK-NEXT: }
263263
// CHECK-NEXT: };
264264
// CHECK-NEXT: namespace _impl{
@@ -273,7 +273,7 @@ public struct Strct {
273273
// CHECK-NEXT: SWIFT_INLINE_THUNK ns::NonTrivialTemplate<ns::TrivialinNS> retNonTrivial2() noexcept SWIFT_SYMBOL({{.*}}) SWIFT_WARN_UNUSED_RESULT {
274274
// CHECK-NEXT: alignas(alignof(ns::NonTrivialTemplate<ns::TrivialinNS>)) char storage[sizeof(ns::NonTrivialTemplate<ns::TrivialinNS>)];
275275
// CHECK-NEXT: auto * _Nonnull storageObjectPtr = reinterpret_cast<ns::NonTrivialTemplate<ns::TrivialinNS> *>(storage);
276-
// CHECK-NEXT: _impl::$s8UseCxxTy14retNonTrivial2So2nsO0037NonTrivialTemplateTrivialinNS_CsGGkdcVyF(storage);
276+
// CHECK-NEXT: _impl::$s8UseCxxTy14retNonTrivial2So2nsO0042NonTrivialTemplatensTrivialinNS_HlGFlenawcVyF(storage);
277277
// CHECK-NEXT: ns::NonTrivialTemplate<ns::TrivialinNS> result(static_cast<ns::NonTrivialTemplate<ns::TrivialinNS> &&>(*storageObjectPtr));
278278
// CHECK-NEXT: storageObjectPtr->~NonTrivialTemplate();
279279
// CHECK-NEXT: return result;
@@ -312,7 +312,7 @@ public struct Strct {
312312
// CHECK-NEXT: }
313313

314314
// CHECK: SWIFT_INLINE_THUNK void takeNonTrivial2(const ns::NonTrivialTemplate<ns::TrivialinNS>& x) noexcept SWIFT_SYMBOL({{.*}}) {
315-
// CHECK-NEXT: _impl::$s8UseCxxTy15takeNonTrivial2yySo2nsO0037NonTrivialTemplateTrivialinNS_CsGGkdcVF(swift::_impl::getOpaquePointer(x));
315+
// CHECK-NEXT: _impl::$s8UseCxxTy15takeNonTrivial2yySo2nsO0042NonTrivialTemplatensTrivialinNS_HlGFlenawcVF(swift::_impl::getOpaquePointer(x));
316316
// CHECK-NEXT: }
317317

318318
// CHECK: SWIFT_INLINE_THUNK void takeSimpleScopedEnum(const SimpleScopedEnum& x) noexcept SWIFT_SYMBOL({{.*}}) {

test/SILGen/opaque_values_cxx.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
import Cxx
99

10-
// CHECK-LABEL: sil {{.*}}[ossa] @$sSo3stdO3__1O0055vectorCUnsignedIntallocatorCUnsignedInt_iqGBpboaivxaEhaV3Cxx0B8SequenceSCAgHP13__beginUnsafe11RawIteratorQzyFTW : {{.*}} {
10+
// CHECK-LABEL: sil {{.*}}[ossa] @$sSo3stdO3__1O0065vectorCUnsignedIntstd__1allocatorCUnsignedInt_dDGIrdqahddCJdFaAjaV3Cxx0B8SequenceSCAgHP13__beginUnsafe11RawIteratorQzyFTW : {{.*}} {
1111
// CHECK: bb0([[VECTOR_ADDR:%[^,]+]] :
1212
// CHECK: [[VECTOR:%[^,]+]] = load_borrow [[VECTOR_ADDR]]
1313
// CHECK: [[BEGIN_FN:%[^,]+]] = function_ref
1414
// CHECK: [[BEGIN:%[^,]+]] = apply [[BEGIN_FN]]([[VECTOR]])
1515
// CHECK: end_borrow [[VECTOR]]
1616
// CHECK: return [[BEGIN]]
17-
// CHECK-LABEL: } // end sil function '$sSo3stdO3__1O0055vectorCUnsignedIntallocatorCUnsignedInt_iqGBpboaivxaEhaV3Cxx0B8SequenceSCAgHP13__beginUnsafe11RawIteratorQzyFTW'
17+
// CHECK-LABEL: } // end sil function '$sSo3stdO3__1O0065vectorCUnsignedIntstd__1allocatorCUnsignedInt_dDGIrdqahddCJdFaAjaV3Cxx0B8SequenceSCAgHP13__beginUnsafe11RawIteratorQzyFTW'
1818
// CHECK-LABEL: sil {{.*}}[ossa] @$sSo3stdO{{(3__1O)?}}0047___wrap_iterUnsafePointerCUnsignedInt_heCInnaEgaVSQSCSQ2eeoiySbx_xtFZTW : {{.*}} {
1919
// CHECK: bb0([[LHS:%[^,]+]] : $std.__1.__wrap_iter<UnsafePointer<CUnsignedInt>>, [[RHS:%[^,]+]] :
2020
// CHECK: [[CALLEE:%[^,]+]] = function_ref @$sSo2eeoiySbSo3stdO{{(3__1O)?}}0047___wrap_iterUnsafePointerCUnsignedInt_heCInnaEgaV_AGtFTO

test/SourceKit/InterfaceGen/gen_clang_libcxx_sdk_module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// REQUIRES: OS=macosx
44

55
// CHECK: import {{CxxStdlib.vector|std_vector}}
6-
// CHECK: extension std.basic_string<CChar, char_traits<CChar>, allocator<CChar>> {
6+
// CHECK: extension std.basic_string<CChar, std.__1.char_traits<CChar>, std.__1.allocator<CChar>> {

0 commit comments

Comments
 (0)