mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
Fix up the ocaml kaleidoscope example as well.
Note that the example currently doesn't appear to work. llvm-svn: 108121
This commit is contained in:
parent
cc60305c22
commit
752cc6f5db
@ -22,9 +22,9 @@ let rec codegen_expr = function
|
||||
let rhs_val = codegen_expr rhs in
|
||||
begin
|
||||
match op with
|
||||
| '+' -> build_add lhs_val rhs_val "addtmp" builder
|
||||
| '-' -> build_sub lhs_val rhs_val "subtmp" builder
|
||||
| '*' -> build_mul lhs_val rhs_val "multmp" builder
|
||||
| '+' -> build_fadd lhs_val rhs_val "addtmp" builder
|
||||
| '-' -> build_fsub lhs_val rhs_val "subtmp" builder
|
||||
| '*' -> build_fmul lhs_val rhs_val "multmp" builder
|
||||
| '<' ->
|
||||
(* Convert bool 0/1 to double 0.0 or 1.0 *)
|
||||
let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in
|
||||
|
@ -22,9 +22,9 @@ let rec codegen_expr = function
|
||||
let rhs_val = codegen_expr rhs in
|
||||
begin
|
||||
match op with
|
||||
| '+' -> build_add lhs_val rhs_val "addtmp" builder
|
||||
| '-' -> build_sub lhs_val rhs_val "subtmp" builder
|
||||
| '*' -> build_mul lhs_val rhs_val "multmp" builder
|
||||
| '+' -> build_fadd lhs_val rhs_val "addtmp" builder
|
||||
| '-' -> build_fsub lhs_val rhs_val "subtmp" builder
|
||||
| '*' -> build_fmul lhs_val rhs_val "multmp" builder
|
||||
| '<' ->
|
||||
(* Convert bool 0/1 to double 0.0 or 1.0 *)
|
||||
let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in
|
||||
|
@ -31,9 +31,9 @@ let rec codegen_expr = function
|
||||
let rhs_val = codegen_expr rhs in
|
||||
begin
|
||||
match op with
|
||||
| '+' -> build_add lhs_val rhs_val "addtmp" builder
|
||||
| '-' -> build_sub lhs_val rhs_val "subtmp" builder
|
||||
| '*' -> build_mul lhs_val rhs_val "multmp" builder
|
||||
| '+' -> build_fadd lhs_val rhs_val "addtmp" builder
|
||||
| '-' -> build_fsub lhs_val rhs_val "subtmp" builder
|
||||
| '*' -> build_fmul lhs_val rhs_val "multmp" builder
|
||||
| '<' ->
|
||||
(* Convert bool 0/1 to double 0.0 or 1.0 *)
|
||||
let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in
|
||||
|
@ -60,9 +60,9 @@ let rec codegen_expr = function
|
||||
let rhs_val = codegen_expr rhs in
|
||||
begin
|
||||
match op with
|
||||
| '+' -> build_add lhs_val rhs_val "addtmp" builder
|
||||
| '-' -> build_sub lhs_val rhs_val "subtmp" builder
|
||||
| '*' -> build_mul lhs_val rhs_val "multmp" builder
|
||||
| '+' -> build_fadd lhs_val rhs_val "addtmp" builder
|
||||
| '-' -> build_fsub lhs_val rhs_val "subtmp" builder
|
||||
| '*' -> build_fmul lhs_val rhs_val "multmp" builder
|
||||
| '<' ->
|
||||
(* Convert bool 0/1 to double 0.0 or 1.0 *)
|
||||
let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in
|
||||
|
Loading…
Reference in New Issue
Block a user