@@ -306,7 +306,6 @@ fn test_anonymous_basic_type() {
306
306
#[ llvm_versions( 8.0 ..=latest) ]
307
307
#[ test]
308
308
fn test_global_expressions ( ) {
309
-
310
309
let context = Context :: create ( ) ;
311
310
let module = context. create_module ( "bin" ) ;
312
311
@@ -326,7 +325,7 @@ fn test_global_expressions() {
326
325
false ,
327
326
) ;
328
327
329
- let di_type = dibuilder. create_basic_type ( "type_name" , 0_u64 , 0x00 , DIFlags :: ZERO ) ;
328
+ let di_type = dibuilder. create_basic_type ( "type_name" , 0_u64 , 0x00 , DIFlags :: ZERO ) ;
330
329
let gv = module. add_global ( context. i64_type ( ) , Some ( inkwell:: AddressSpace :: Global ) , "gv" ) ;
331
330
332
331
let const_v = dibuilder. create_constant_expression ( 10 ) ;
@@ -337,15 +336,18 @@ fn test_global_expressions() {
337
336
"" ,
338
337
compile_unit. get_file ( ) ,
339
338
1 ,
340
- di_type. unwrap ( ) . as_type ( ) ,
339
+ di_type. unwrap ( ) . as_type ( ) ,
341
340
true ,
342
- Some ( const_v) , None , 8 ) ;
341
+ Some ( const_v) ,
342
+ None ,
343
+ 8 ,
344
+ ) ;
343
345
344
346
let metadata = context. metadata_node ( & [ gv_debug. as_metadata_value ( & context) . into ( ) ] ) ;
345
347
346
348
gv. set_metadata ( metadata, 0 ) ;
347
349
348
- //TODO : Metadata set on the global values cannot be retrieved using the C api,
350
+ // TODO : Metadata set on the global values cannot be retrieved using the C api,
349
351
// therefore, it's currently not possible to test that the data was set without generating the IR
350
352
assert ! ( gv. print_to_string( ) . to_string( ) . contains( "!dbg" ) , format!( "expected !dbg but generated gv was {}" , gv. print_to_string( ) ) ) ;
351
353
}
0 commit comments