[PATCH] Add the Instruction::clone function to llvm-c, and export it to the ocaml bindings

chifflier at wzdftpd.net chifflier at wzdftpd.net
Mon Oct 13 12:23:27 PDT 2014


Hi whitequark, wanders,

Export Instruction::clone() in the OCaml bindings.
Instructions can then be cloned using
"let new_i = instr_clone instr in [...]"

Instruction has no parent, and operands of the instruction must be updated (using the existing set_operand).

Tested on llvm 3.5, using some more (OCaml) code to clone an entire function.

http://reviews.llvm.org/D5757

Files:
  bindings/ocaml/llvm/llvm.ml
  bindings/ocaml/llvm/llvm.mli
  bindings/ocaml/llvm/llvm_ocaml.c
  include/llvm-c/Core.h
  lib/IR/Core.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5757.14812.patch
Type: text/x-patch
Size: 2654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141013/1979bc0e/attachment.bin>


More information about the llvm-commits mailing list