@@ -39,10 +39,10 @@ class ConstantSpec : XCTestCase {
39
39
// UNSIGNEDCONST-NEXT: source_filename = "[[ModuleName]]"
40
40
let module = Module ( name: " ConstantTest " )
41
41
let builder = IRBuilder ( module: module)
42
- // UNSIGNEDCONST: define void @main() {
42
+ // UNSIGNEDCONST: define i64 @main() {
43
43
let main = builder. addFunction ( " main " ,
44
44
type: FunctionType ( argTypes: [ ] ,
45
- returnType: VoidType ( ) ) )
45
+ returnType: IntType . int64 ) )
46
46
let constant = IntType . int64. constant ( UInt64 ( 42 ) )
47
47
48
48
// UNSIGNEDCONST-NEXT: entry:
@@ -67,10 +67,10 @@ class ConstantSpec : XCTestCase {
67
67
// FLOATINGCONST-NEXT: source_filename = "[[ModuleName]]"
68
68
let module = Module ( name: " ConstantTest " )
69
69
let builder = IRBuilder ( module: module)
70
- // FLOATINGCONST: define void @main() {
70
+ // FLOATINGCONST: define i64 @main() {
71
71
let main = builder. addFunction ( " main " ,
72
72
type: FunctionType ( argTypes: [ ] ,
73
- returnType: VoidType ( ) ) )
73
+ returnType: IntType . int64 ) )
74
74
let constant = FloatType . double. constant ( 42.0 )
75
75
76
76
// FLOATINGCONST-NEXT: entry:
@@ -95,10 +95,10 @@ class ConstantSpec : XCTestCase {
95
95
// STRUCTCONST-NEXT: source_filename = "[[ModuleName]]"
96
96
let module = Module ( name: " ConstantTest " )
97
97
let builder = IRBuilder ( module: module)
98
- // STRUCTCONST: define void @main() {
98
+ // STRUCTCONST: define i64 @main() {
99
99
let main = builder. addFunction ( " main " ,
100
100
type: FunctionType ( argTypes: [ ] ,
101
- returnType: VoidType ( ) ) )
101
+ returnType: IntType . int64 ) )
102
102
103
103
let constant = StructType ( elementTypes: [ IntType . int64] )
104
104
. constant ( values: [ 42 ] )
@@ -118,10 +118,10 @@ class ConstantSpec : XCTestCase {
118
118
// STRUCTCONSTGETELEMENT-NEXT: source_filename = "[[ModuleName]]"
119
119
let module = Module ( name: " ConstantTest " )
120
120
let builder = IRBuilder ( module: module)
121
- // STRUCTCONSTGETELEMENT: define void @main() {
121
+ // STRUCTCONSTGETELEMENT: define i64 @main() {
122
122
let main = builder. addFunction ( " main " ,
123
123
type: FunctionType ( argTypes: [ ] ,
124
- returnType: VoidType ( ) ) )
124
+ returnType: IntType . int64 ) )
125
125
126
126
let constant = StructType ( elementTypes: [ IntType . int64] )
127
127
. constant ( values: [ 42 ] )
0 commit comments