Skip to content

Commit

Permalink
IRGen: Fix {class,struct}_resilience tests on 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
slavapestov committed Nov 17, 2015
1 parent 36fa732 commit 362c801
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/IRGen/class_resilience.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class ClassWithIndirectResilientEnum {


// CHECK-LABEL: define {{i32|i64}} @_TFC16class_resilience24ClassWithResilientLayoutg5colorSi(%C16class_resilience24ClassWithResilientLayout*)
// CHECK: [[OFFSET:%.*]] = load [[INT]], [[INT]]* @_TWvdvC16class_resilience24ClassWithResilientLayout5colorSi, align 8
// CHECK: [[OFFSET:%.*]] = load [[INT]], [[INT]]* @_TWvdvC16class_resilience24ClassWithResilientLayout5colorSi
// CHECK-NEXT: [[PTR:%.*]] = bitcast %C16class_resilience24ClassWithResilientLayout* %0 to i8*
// CHECK-NEXT: [[FIELD_ADDR:%.*]] = getelementptr inbounds i8, i8* [[PTR]], [[INT]] [[OFFSET]]
// CHECK-NEXT: [[FIELD_PTR:%.*]] = bitcast i8* [[FIELD_ADDR]] to %Si*
Expand Down
6 changes: 3 additions & 3 deletions test/IRGen/struct_resilience.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ public struct StructWithIndirectResilientEnum {
// CHECK-LABEL: define {{i32|i64}} @_TFV17struct_resilience31StructWithIndirectResilientEnumg1nSi(%V17struct_resilience31StructWithIndirectResilientEnum* {{.*}})
// CHECK: [[FIELD_PTR:%.*]] = getelementptr inbounds %V17struct_resilience31StructWithIndirectResilientEnum, %V17struct_resilience31StructWithIndirectResilientEnum* %0, i32 0, i32 1
// CHECK-NEXT: [[FIELD_PAYLOAD_PTR:%.*]] = getelementptr inbounds %Si, %Si* [[FIELD_PTR]], i32 0, i32 0
// CHECK-NEXT: [[FIELD_PAYLOAD:%.*]] = load i64, i64* [[FIELD_PAYLOAD_PTR]]
// CHECK-NEXT: ret i64 [[FIELD_PAYLOAD]]
// CHECK-NEXT: [[FIELD_PAYLOAD:%.*]] = load [[INT]], [[INT]]* [[FIELD_PAYLOAD_PTR]]
// CHECK-NEXT: ret [[INT]] [[FIELD_PAYLOAD]]


// Public metadata accessor for our resilient struct

// CHECK-LABEL: define %swift.type* @_TMaV17struct_resilience6MySize()
// CHECK: ret %swift.type* bitcast (i64* getelementptr inbounds {{.*}} @_TMfV17struct_resilience6MySize, i32 0, i32 1) to %swift.type*)
// CHECK: ret %swift.type* bitcast ([[INT]]* getelementptr inbounds {{.*}} @_TMfV17struct_resilience6MySize, i32 0, i32 1) to %swift.type*)


// FIXME: this is bogus
Expand Down

0 comments on commit 362c801

Please sign in to comment.