diff options
author | Eric Christopher <echristo@apple.com> | 2010-07-12 02:32:44 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-07-12 02:32:44 +0000 |
commit | 688d58033a077dd05be830cd23f8d416ce1be59d (patch) | |
tree | f29ca81e46b34ea33bcc61ecba0a59386cb6eaaa /examples/OCaml-Kaleidoscope/Chapter6 | |
parent | 8b78d4b5bb078204a04d4308a56e6f5c0c83e488 (diff) | |
download | external_llvm-688d58033a077dd05be830cd23f8d416ce1be59d.zip external_llvm-688d58033a077dd05be830cd23f8d416ce1be59d.tar.gz external_llvm-688d58033a077dd05be830cd23f8d416ce1be59d.tar.bz2 |
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
Diffstat (limited to 'examples/OCaml-Kaleidoscope/Chapter6')
-rw-r--r-- | examples/OCaml-Kaleidoscope/Chapter6/codegen.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/OCaml-Kaleidoscope/Chapter6/codegen.ml b/examples/OCaml-Kaleidoscope/Chapter6/codegen.ml index e00edf2..9667435 100644 --- a/examples/OCaml-Kaleidoscope/Chapter6/codegen.ml +++ b/examples/OCaml-Kaleidoscope/Chapter6/codegen.ml @@ -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 |