Skip to content

Commit 01ef8b2

Browse files
committed
Merge branch 'twowordpair-swiftcc-tests' into twowordpair-swiftcc
2 parents 7c7ac6a + 215592c commit 01ef8b2

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

stdlib/public/SDK/Foundation/CheckClass.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static void logIfFirstOccurrence(Class objcClass, void (^log)(void)) {
5959
template <size_t N>
6060
StringRefLite(const char (&staticStr)[N]) : data(staticStr), length(N) {}
6161

62-
StringRefLite(TypeNamePair rawValue)
62+
StringRefLite(swift::TypeNamePair rawValue)
6363
: data(rawValue.data),
6464
length(rawValue.length){}
6565

stdlib/public/runtime/SwiftValue.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ - (NSString *)_swiftTypeName {
369369
TypeNamePair typeName
370370
= swift_getTypeName(getSwiftValueTypeMetadata(self), true);
371371

372-
return [NSString stringWithUTF8String: typeName.first];
372+
return [NSString stringWithUTF8String: typeName.data];
373373
}
374374
- (const OpaqueValue *)_swiftValue {
375375
return getValueFromSwiftValue(self).second;

test/IRGen/boxed_existential.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ entry(%e : $Error):
2121
// CHECK-LABEL: define{{( protected)?}} swiftcc %swift.error* @alloc_boxed_existential(%swift.opaque* noalias nocapture, %swift.type* %T, i8** %T.Error)
2222
sil @alloc_boxed_existential : $@convention(thin) <T: Error> (@in T) -> @owned Error {
2323
entry(%x : $*T):
24-
// CHECK: [[BOX_PAIR:%.*]] = call { %swift.error*, %swift.opaque* } @swift_allocError(%swift.type* %T, i8** %T.Error, %swift.opaque* null, i1 false)
24+
// CHECK: [[BOX_PAIR:%.*]] = call swiftcc { %swift.error*, %swift.opaque* } @swift_allocError(%swift.type* %T, i8** %T.Error, %swift.opaque* null, i1 false)
2525
// CHECK: [[BOX:%.*]] = extractvalue { %swift.error*, %swift.opaque* } [[BOX_PAIR]], 0
2626
// CHECK: [[ADDR:%.*]] = extractvalue { %swift.error*, %swift.opaque* } [[BOX_PAIR]], 1
2727
%b = alloc_existential_box $Error, $T
@@ -40,7 +40,7 @@ struct SomeError: Error {
4040
// CHECK-LABEL: define{{( protected)?}} swiftcc %swift.error* @alloc_boxed_existential_concrete
4141
sil @alloc_boxed_existential_concrete : $@convention(thin) (@owned SomeError) -> @owned Error {
4242
entry(%x : $SomeError):
43-
// CHECK: [[BOX_PAIR:%.*]] = call { %swift.error*, %swift.opaque* } @swift_allocError(%swift.type* {{.*}} @_T017boxed_existential9SomeErrorVMf, {{.*}}, i8** {{%.*|@_T017boxed_existential9SomeErrorVs0D0AAWP}}, %swift.opaque* null, i1 false)
43+
// CHECK: [[BOX_PAIR:%.*]] = call swiftcc { %swift.error*, %swift.opaque* } @swift_allocError(%swift.type* {{.*}} @_T017boxed_existential9SomeErrorVMf, {{.*}}, i8** {{%.*|@_T017boxed_existential9SomeErrorVs0D0AAWP}}, %swift.opaque* null, i1 false)
4444
// CHECK: [[BOX:%.*]] = extractvalue { %swift.error*, %swift.opaque* } [[BOX_PAIR]], 0
4545
// CHECK: [[OPAQUE_ADDR:%.*]] = extractvalue { %swift.error*, %swift.opaque* } [[BOX_PAIR]], 1
4646
// CHECK: [[ADDR:%.*]] = bitcast %swift.opaque* [[OPAQUE_ADDR]] to %T17boxed_existential9SomeErrorV*

test/IRGen/closure.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func b<T : Ordinable>(seq seq: T) -> (Int) -> Int {
4949
func captures_tuple<T, U>(x x: (T, U)) -> () -> (T, U) {
5050
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getTupleTypeMetadata2(%swift.type* %T, %swift.type* %U, i8* null, i8** null)
5151
// CHECK-NOT: @swift_getTupleTypeMetadata2
52-
// CHECK: [[BOX:%.*]] = call { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* [[METADATA]])
52+
// CHECK: [[BOX:%.*]] = call swiftcc { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* [[METADATA]])
5353
// CHECK: [[ADDR:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[BOX]], 1
5454
// CHECK: bitcast %swift.opaque* [[ADDR]] to <{}>*
5555
return {x}

test/IRGen/existentials_opaque_boxed.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ entry(%0 : $*T):
5454
// CHECK: ret %swift.opaque* [[EXISTENTIAL_BUFFER_OPAQUE]]
5555
//
5656
// CHECK:allocateBox:
57-
// CHECK: [[CALL:%.*]] = call { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* [[METATYPE]])
57+
// CHECK: [[CALL:%.*]] = call swiftcc { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* [[METATYPE]])
5858
// CHECK: [[BOX:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[CALL]], 0
5959
// CHECK: [[ADDR:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[CALL]], 1
6060
// CHECK: [[ADDR_IN_BUFFER:%.*]] = bitcast [{{(24|12)}} x i8]* [[EXISTENTIAL_BUFFER]] to %swift.refcounted**
@@ -221,7 +221,7 @@ bb0(%0 : $*Existential):
221221
// CHECK: boxed:
222222
// CHECK: [[ALIGNMASK:%.*]] = and {{(i64|i32)}} [[FLAGS]], 65535
223223
// CHECK: [[OPAQUE_ADDR:%.*]] = bitcast [{{(24|12)}} x i8]* %0 to %swift.opaque*
224-
// CHECK: [[REFANDADDR:%.*]] = call { %swift.refcounted*, %swift.opaque* } @swift_makeBoxUnique(%swift.opaque* [[OPAQUE_ADDR]], %swift.type* %1, {{(i64|i32)}} [[ALIGNMASK]])
224+
// CHECK: [[REFANDADDR:%.*]] = call swiftcc { %swift.refcounted*, %swift.opaque* } @swift_makeBoxUnique(%swift.opaque* [[OPAQUE_ADDR]], %swift.type* %1, {{(i64|i32)}} [[ALIGNMASK]])
225225
// CHECK: [[REF:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[REFANDADDR]], 0
226226
// CHECK: [[ADDR:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[REFANDADDR]], 1
227227
// CHECK: ret %swift.opaque* [[ADDR]]

test/IRGen/typed_boxes.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ sil @take_t : $@convention(thin) <T> (@in T) -> ()
121121
sil @dyn_box_a : $@convention(thin) <T> () -> () {
122122
entry:
123123
// CHECK: [[METADATA:%.*]] = call %swift.type* @_T011typed_boxes3DynVMa(%swift.type* %T)
124-
// CHECK: [[ALLOC:%.*]] = call { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* [[METADATA]])
124+
// CHECK: [[ALLOC:%.*]] = call swiftcc { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* [[METADATA]])
125125
// CHECK: [[BOX:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[ALLOC]], 0
126126
// CHECK: [[PTR:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[ALLOC]], 1
127127
%a = alloc_box $<τ_0_0> { var τ_0_0 } <Dyn<T>>
@@ -138,7 +138,7 @@ entry:
138138
// CHECK-LABEL: define{{( protected)?}} swiftcc void @dyn_box_b
139139
sil @dyn_box_b : $@convention(thin) <T> () -> () {
140140
entry:
141-
// CHECK: [[ALLOC:%.*]] = call { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* %T)
141+
// CHECK: [[ALLOC:%.*]] = call swiftcc { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* %T)
142142
// CHECK: [[BOX:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[ALLOC]], 0
143143
// CHECK: [[PTR:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[ALLOC]], 1
144144
%a = alloc_box $<τ_0_0> { var τ_0_0 } <T>

0 commit comments

Comments
 (0)