@@ -12,23 +12,9 @@ struct UnsafePointer<T> { }
12
12
struct UnsafeMutablePointer < T> { }
13
13
14
14
public 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
- //
29
15
// ITANIUM_X64: define swiftcc void @"$ss20createHasVirtualBaseSo0bcD0VyF"(%TSo14HasVirtualBaseV* noalias nocapture sret %0)
30
16
// 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]+}})
32
18
//
33
19
// ITANIUM_ARM: define protected swiftcc void @"$ss20createHasVirtualBaseSo0bcD0VyF"(%TSo14HasVirtualBaseV* noalias nocapture sret %0)
34
20
// To verify that the thunk is inlined, make sure there's no intervening
@@ -48,7 +34,7 @@ public func createHasVirtualBase() -> HasVirtualBase {
48
34
public func createImplicitDefaultConstructor( ) -> ImplicitDefaultConstructor {
49
35
// ITANIUM_X64: define swiftcc i32 @"$ss32createImplicitDefaultConstructorSo0bcD0VyF"()
50
36
// 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]+}})
52
38
//
53
39
// ITANIUM_ARM: define protected swiftcc i32 @"$ss32createImplicitDefaultConstructorSo0bcD0VyF"()
54
40
// ITANIUM_ARM-NOT: define
@@ -66,7 +52,7 @@ public func createStructWithSubobjectCopyConstructorAndValue() {
66
52
// ITANIUM_X64-LABEL: define swiftcc void @"$ss48createStructWithSubobjectCopyConstructorAndValueyyF"()
67
53
// ITANIUM_X64: [[MEMBER:%.*]] = alloca %TSo33StructWithCopyConstructorAndValueV
68
54
// 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]])
70
56
// ITANIUM_X64: call %TSo33StructWithCopyConstructorAndValueV* @"$sSo33StructWithCopyConstructorAndValueVWOc"(%TSo33StructWithCopyConstructorAndValueV* [[MEMBER]], %TSo33StructWithCopyConstructorAndValueV* [[TMP:%.*]])
71
57
// ITANIUM_X64: [[OBJ_MEMBER:%.*]] = getelementptr inbounds %TSo42StructWithSubobjectCopyConstructorAndValueV, %TSo42StructWithSubobjectCopyConstructorAndValueV* %obj, i32 0, i32 0
72
58
// ITANIUM_X64: call %TSo33StructWithCopyConstructorAndValueV* @"$sSo33StructWithCopyConstructorAndValueVWOb"(%TSo33StructWithCopyConstructorAndValueV* [[TMP]], %TSo33StructWithCopyConstructorAndValueV* [[OBJ_MEMBER]])
0 commit comments