@@ -11,20 +11,21 @@ typealias Void = ()
11
11
public func createHasVirtualBase( ) -> HasVirtualBase {
12
12
// - The `this` parameter should carry a `noalias` attribute, as it is
13
13
// guaranteed that nothing will alias the object before it has been fully
14
- // constructed. It should also carry an `sret` attribute to indicate that
15
- // this is an out parameter for a structure being returned by the function.
16
- // Note that this doesn't apply on ABIs (Itanium ARM, Microsoft x64)
17
- // where we insert an (inlined) thunk; in this case, we're getting the
18
- // attributes of the constructor that was generated by Clang, which doesn't
19
- // insert these attributes.
14
+ // constructed. Note that this doesn't apply on ABIs (Itanium ARM,
15
+ // Microsoft x64) where we insert an (inlined) thunk; in this case, we're
16
+ // getting the attributes of the constructor that was generated by Clang,
17
+ // which doesn't insert these attributes.
18
+ //
19
+ // - The `this` parameter should _not_ carry an `sret` attribute because the
20
+ // constructor doesn't return the constructed object as a return value.
20
21
//
21
22
// - The `this` parameter should _not_ carry a `nocapture` attribute (unlike
22
23
// Swift constructors that return their result indirectly) because the C++
23
24
// constructor has explicit access to `this` and may capture it.
24
25
//
25
26
// ITANIUM_X64: define swiftcc void @"$ss20createHasVirtualBaseSo0bcD0VyF"(%TSo14HasVirtualBaseV* noalias nocapture sret %0)
26
27
// ITANIUM_X64-NOT: define
27
- // ITANIUM_X64: call void @_ZN14HasVirtualBaseC1E7ArgType(%struct.HasVirtualBase* noalias sret %{{[0-9]+}}, i32 %{{[0-9]+}})
28
+ // ITANIUM_X64: call void @_ZN14HasVirtualBaseC1E7ArgType(%struct.HasVirtualBase* noalias %{{[0-9]+}}, i32 %{{[0-9]+}})
28
29
//
29
30
// ITANIUM_ARM: define protected swiftcc void @"$ss20createHasVirtualBaseSo0bcD0VyF"(%TSo14HasVirtualBaseV* noalias nocapture sret %0)
30
31
// To verify that the thunk is inlined, make sure there's no intervening
0 commit comments