@@ -946,12 +946,12 @@ impl<'a> Compiler<'a> {
946
946
'*' => Ok ( self . builder . build_float_mul ( & lhs, & rhs, "tmpmul" ) ) ,
947
947
'/' => Ok ( self . builder . build_float_div ( & lhs, & rhs, "tmpdiv" ) ) ,
948
948
'<' => Ok ( {
949
- let cmp = self . builder . build_float_compare ( & FloatPredicate :: ULT , & lhs, & rhs, "tmpcmp" ) ;
949
+ let cmp = self . builder . build_float_compare ( FloatPredicate :: ULT , & lhs, & rhs, "tmpcmp" ) ;
950
950
951
951
self . builder . build_unsigned_int_to_float ( & cmp, & self . context . f64_type ( ) , "tmpbool" )
952
952
} ) ,
953
953
'>' => Ok ( {
954
- let cmp = self . builder . build_float_compare ( & FloatPredicate :: ULT , & rhs, & lhs, "tmpcmp" ) ;
954
+ let cmp = self . builder . build_float_compare ( FloatPredicate :: ULT , & rhs, & lhs, "tmpcmp" ) ;
955
955
956
956
self . builder . build_unsigned_int_to_float ( & cmp, & self . context . f64_type ( ) , "tmpbool" )
957
957
} ) ,
@@ -1002,7 +1002,7 @@ impl<'a> Compiler<'a> {
1002
1002
1003
1003
// create condition by comparing without 0.0 and returning an int
1004
1004
let cond = self . compile_expr ( cond) ?;
1005
- let cond = self . builder . build_float_compare ( & FloatPredicate :: ONE , & cond, & zero_const, "ifcond" ) ;
1005
+ let cond = self . builder . build_float_compare ( FloatPredicate :: ONE , & cond, & zero_const, "ifcond" ) ;
1006
1006
1007
1007
// build branch
1008
1008
let then_bb = self . context . append_basic_block ( & parent, "then" ) ;
@@ -1073,7 +1073,7 @@ impl<'a> Compiler<'a> {
1073
1073
1074
1074
self . builder . build_store ( & start_alloca, & next_var) ;
1075
1075
1076
- let end_cond = self . builder . build_float_compare ( & FloatPredicate :: ONE , & end_cond, & self . context . f64_type ( ) . const_float ( 0.0 ) , "loopcond" ) ;
1076
+ let end_cond = self . builder . build_float_compare ( FloatPredicate :: ONE , & end_cond, & self . context . f64_type ( ) . const_float ( 0.0 ) , "loopcond" ) ;
1077
1077
let after_bb = self . context . append_basic_block ( & parent, "afterloop" ) ;
1078
1078
1079
1079
self . builder . build_conditional_branch ( & end_cond, & loop_bb, & after_bb) ;
0 commit comments