@@ -12,23 +12,9 @@ struct UnsafePointer<T> { }
1212struct UnsafeMutablePointer < T> { }
1313
1414public func createHasVirtualBase( ) -> HasVirtualBase {
15- // - The `this` parameter should carry a `noalias` attribute, as it is
16- // guaranteed that nothing will alias the object before it has been fully
17- // constructed. Note that this doesn't apply on ABIs (Itanium ARM,
18- // Microsoft x64) where we insert an (inlined) thunk; in this case, we're
19- // getting the attributes of the constructor that was generated by Clang,
20- // which doesn't insert these attributes.
21- //
22- // - The `this` parameter should _not_ carry an `sret` attribute because the
23- // constructor doesn't return the constructed object as a return value.
24- //
25- // - The `this` parameter should _not_ carry a `nocapture` attribute (unlike
26- // Swift constructors that return their result indirectly) because the C++
27- // constructor has explicit access to `this` and may capture it.
28- //
2915 // ITANIUM_X64: define swiftcc void @"$ss20createHasVirtualBaseSo0bcD0VyF"(%TSo14HasVirtualBaseV* noalias nocapture sret %0)
3016 // ITANIUM_X64-NOT: define
31- // ITANIUM_X64: call void @_ZN14HasVirtualBaseC1E7ArgType(%struct.HasVirtualBase* noalias %{{[0-9]+}}, i32 %{{[0-9]+}})
17+ // ITANIUM_X64: call void @_ZN14HasVirtualBaseC1E7ArgType(%struct.HasVirtualBase* %{{[0-9]+}}, i32 %{{[0-9]+}})
3218 //
3319 // ITANIUM_ARM: define protected swiftcc void @"$ss20createHasVirtualBaseSo0bcD0VyF"(%TSo14HasVirtualBaseV* noalias nocapture sret %0)
3420 // To verify that the thunk is inlined, make sure there's no intervening
@@ -48,7 +34,7 @@ public func createHasVirtualBase() -> HasVirtualBase {
4834public func createImplicitDefaultConstructor( ) -> ImplicitDefaultConstructor {
4935 // ITANIUM_X64: define swiftcc i32 @"$ss32createImplicitDefaultConstructorSo0bcD0VyF"()
5036 // ITANIUM_X64-NOT: define
51- // ITANIUM_X64: call void @_ZN26ImplicitDefaultConstructorC1Ev(%struct.ImplicitDefaultConstructor* noalias %{{[0-9]+}})
37+ // ITANIUM_X64: call void @_ZN26ImplicitDefaultConstructorC1Ev(%struct.ImplicitDefaultConstructor* %{{[0-9]+}})
5238 //
5339 // ITANIUM_ARM: define protected swiftcc i32 @"$ss32createImplicitDefaultConstructorSo0bcD0VyF"()
5440 // ITANIUM_ARM-NOT: define
@@ -66,7 +52,7 @@ public func createStructWithSubobjectCopyConstructorAndValue() {
6652 // ITANIUM_X64-LABEL: define swiftcc void @"$ss48createStructWithSubobjectCopyConstructorAndValueyyF"()
6753 // ITANIUM_X64: [[MEMBER:%.*]] = alloca %TSo33StructWithCopyConstructorAndValueV
6854 // ITANIUM_X64: [[MEMBER_AS_STRUCT:%.*]] = bitcast %TSo33StructWithCopyConstructorAndValueV* %member to %struct.StructWithCopyConstructorAndValue*
69- // ITANIUM_X64: void @_ZN33StructWithCopyConstructorAndValueC1Ev(%struct.StructWithCopyConstructorAndValue* noalias [[MEMBER_AS_STRUCT]])
55+ // ITANIUM_X64: void @_ZN33StructWithCopyConstructorAndValueC1Ev(%struct.StructWithCopyConstructorAndValue* [[MEMBER_AS_STRUCT]])
7056 // ITANIUM_X64: call %TSo33StructWithCopyConstructorAndValueV* @"$sSo33StructWithCopyConstructorAndValueVWOc"(%TSo33StructWithCopyConstructorAndValueV* [[MEMBER]], %TSo33StructWithCopyConstructorAndValueV* [[TMP:%.*]])
7157 // ITANIUM_X64: [[OBJ_MEMBER:%.*]] = getelementptr inbounds %TSo42StructWithSubobjectCopyConstructorAndValueV, %TSo42StructWithSubobjectCopyConstructorAndValueV* %obj, i32 0, i32 0
7258 // ITANIUM_X64: call %TSo33StructWithCopyConstructorAndValueV* @"$sSo33StructWithCopyConstructorAndValueVWOb"(%TSo33StructWithCopyConstructorAndValueV* [[TMP]], %TSo33StructWithCopyConstructorAndValueV* [[OBJ_MEMBER]])
0 commit comments