llvm.org GIT mirror llvm / 688d580
Fix up the ocaml kaleidoscope example as well. Note that the example currently doesn't appear to work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108121 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 9 years ago
4 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
2121 let rhs_val = codegen_expr rhs in
2222 begin
2323 match op with
24 | '+' -> build_add lhs_val rhs_val "addtmp" builder
25 | '-' -> build_sub lhs_val rhs_val "subtmp" builder
26 | '*' -> build_mul lhs_val rhs_val "multmp" builder
24 | '+' -> build_fadd lhs_val rhs_val "addtmp" builder
25 | '-' -> build_fsub lhs_val rhs_val "subtmp" builder
26 | '*' -> build_fmul lhs_val rhs_val "multmp" builder
2727 | '<' ->
2828 (* Convert bool 0/1 to double 0.0 or 1.0 *)
2929 let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in
2121 let rhs_val = codegen_expr rhs in
2222 begin
2323 match op with
24 | '+' -> build_add lhs_val rhs_val "addtmp" builder
25 | '-' -> build_sub lhs_val rhs_val "subtmp" builder
26 | '*' -> build_mul lhs_val rhs_val "multmp" builder
24 | '+' -> build_fadd lhs_val rhs_val "addtmp" builder
25 | '-' -> build_fsub lhs_val rhs_val "subtmp" builder
26 | '*' -> build_fmul lhs_val rhs_val "multmp" builder
2727 | '<' ->
2828 (* Convert bool 0/1 to double 0.0 or 1.0 *)
2929 let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in
3030 let rhs_val = codegen_expr rhs in
3131 begin
3232 match op with
33 | '+' -> build_add lhs_val rhs_val "addtmp" builder
34 | '-' -> build_sub lhs_val rhs_val "subtmp" builder
35 | '*' -> build_mul lhs_val rhs_val "multmp" builder
33 | '+' -> build_fadd lhs_val rhs_val "addtmp" builder
34 | '-' -> build_fsub lhs_val rhs_val "subtmp" builder
35 | '*' -> build_fmul lhs_val rhs_val "multmp" builder
3636 | '<' ->
3737 (* Convert bool 0/1 to double 0.0 or 1.0 *)
3838 let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in
5959 let rhs_val = codegen_expr rhs in
6060 begin
6161 match op with
62 | '+' -> build_add lhs_val rhs_val "addtmp" builder
63 | '-' -> build_sub lhs_val rhs_val "subtmp" builder
64 | '*' -> build_mul lhs_val rhs_val "multmp" builder
62 | '+' -> build_fadd lhs_val rhs_val "addtmp" builder
63 | '-' -> build_fsub lhs_val rhs_val "subtmp" builder
64 | '*' -> build_fmul lhs_val rhs_val "multmp" builder
6565 | '<' ->
6666 (* Convert bool 0/1 to double 0.0 or 1.0 *)
6767 let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in