@@ -279,16 +279,16 @@ fn test_mem_instructions() {
279
279
let load = builder. build_load ( arg1, "" ) ;
280
280
let load_instruction = load. as_instruction_value ( ) . unwrap ( ) ;
281
281
282
- assert_eq ! ( store_instruction. get_volatile( ) , false ) ;
283
- assert_eq ! ( load_instruction. get_volatile( ) , false ) ;
284
- store_instruction. set_volatile ( true ) ;
285
- load_instruction. set_volatile ( true ) ;
286
- assert_eq ! ( store_instruction. get_volatile( ) , true ) ;
287
- assert_eq ! ( load_instruction. get_volatile( ) , true ) ;
288
- store_instruction. set_volatile ( false ) ;
289
- load_instruction. set_volatile ( false ) ;
290
- assert_eq ! ( store_instruction. get_volatile( ) , false ) ;
291
- assert_eq ! ( load_instruction. get_volatile( ) , false ) ;
282
+ assert_eq ! ( store_instruction. get_volatile( ) . unwrap ( ) , false ) ;
283
+ assert_eq ! ( load_instruction. get_volatile( ) . unwrap ( ) , false ) ;
284
+ store_instruction. set_volatile ( true ) . unwrap ( ) ;
285
+ load_instruction. set_volatile ( true ) . unwrap ( ) ;
286
+ assert_eq ! ( store_instruction. get_volatile( ) . unwrap ( ) , true ) ;
287
+ assert_eq ! ( load_instruction. get_volatile( ) . unwrap ( ) , true ) ;
288
+ store_instruction. set_volatile ( false ) . unwrap ( ) ;
289
+ load_instruction. set_volatile ( false ) . unwrap ( ) ;
290
+ assert_eq ! ( store_instruction. get_volatile( ) . unwrap ( ) , false ) ;
291
+ assert_eq ! ( load_instruction. get_volatile( ) . unwrap ( ) , false ) ;
292
292
293
293
assert_eq ! ( store_instruction. get_alignment( ) . unwrap( ) , 0 ) ;
294
294
assert_eq ! ( load_instruction. get_alignment( ) . unwrap( ) , 0 ) ;
@@ -305,6 +305,8 @@ fn test_mem_instructions() {
305
305
assert_eq ! ( store_instruction. get_alignment( ) . unwrap( ) , 0 ) ;
306
306
307
307
let fadd_instruction = builder. build_float_add ( load. into_float_value ( ) , f32_val, "" ) . as_instruction_value ( ) . unwrap ( ) ;
308
+ assert ! ( fadd_instruction. get_volatile( ) . is_err( ) ) ;
309
+ assert ! ( fadd_instruction. set_volatile( false ) . is_err( ) ) ;
308
310
assert ! ( fadd_instruction. get_alignment( ) . is_err( ) ) ;
309
311
assert ! ( fadd_instruction. set_alignment( 16 ) . is_err( ) ) ;
310
312
}
0 commit comments