Peter Zotov
00b6a9b181
[OCaml] Documentation improvements.
...
Patch by Julien Sagot
llvm-svn: 212230
2014-07-02 22:17:20 +00:00
Peter Zotov
a4af01839f
[OCaml] Documentation improvements.
...
llvm-svn: 212048
2014-06-30 16:53:53 +00:00
Peter Zotov
2b5a047956
[OCaml] Unbreak Llvm_target.TargetMachine.set_verbose_asm
...
Patch by Jacques-Pascal Deplaix
llvm-svn: 210480
2014-06-09 17:34:34 +00:00
Peter Zotov
c86d1c1e5e
[OCaml] Commit missing parts of r210395
...
llvm-svn: 210396
2014-06-07 15:53:28 +00:00
Peter Zotov
7ce15f7684
[OCaml] Introduce an llmdkind abstract type.
...
Patch by Gabriel Radanne.
While this commit technically breaks API, no code should have supplied
the integer IDs directly, and thus no code should break.
llvm-svn: 210395
2014-06-07 15:15:10 +00:00
Peter Zotov
bf8a9ac768
[OCaml] Add an ocamlfind package llvm.all_backends.
...
This package is useful for architecture-independent tools like llc.
Patch by Jacques-Pascal Deplaix.
llvm-svn: 207793
2014-05-01 21:00:52 +00:00
NAKAMURA Takumi
a5fb6a4730
Makefile.ocaml: Tweak to use --system-libs.
...
llvm-svn: 197758
2013-12-20 00:36:59 +00:00
Alp Toker
171b0c36a3
Fix documentation typos
...
llvm-svn: 197757
2013-12-20 00:33:39 +00:00
Peter Zotov
e7255da917
[OCaml] Add a slash accidentally omitted from Makefile
...
llvm-svn: 195912
2013-11-28 09:03:28 +00:00
Peter Zotov
40a5d378f6
[OCaml] Embed rpath into stub libraries and native executables
...
This commit embeds a set of linker flags with hardcoded paths to
the LLVM shared library on --enable-shared builds into .cmxa files
and stub dynamic libraries. This solution closely follows existing
rules for rpath in the LLVM tools, which had to be modified because
of differences in toolchain.
Without this patch, OCaml tests as well as opam bindings broke,
as neither of those updates LD_LIBRARY_PATH to include
the $prefix/lib directory.
llvm-svn: 195834
2013-11-27 11:03:18 +00:00
Peter Zotov
5d35f2ce03
[OCaml] Embed the flags necessary for linking with libLLVM.so into .cmxa files
...
llvm-svn: 195782
2013-11-26 20:40:34 +00:00
Peter Zotov
05c091455e
[OCaml] Unbreak make install by providing ocamldoc target
...
llvm-svn: 195336
2013-11-21 10:10:16 +00:00
Peter Zotov
0c7f2977ca
[OCaml] Add Target and TargetMachine bindings to Llvm_target
...
llvm-svn: 194774
2013-11-15 02:51:57 +00:00
Peter Zotov
8a1a3bfc05
[OCaml] Refactor Llvm_target interface
...
This commit brings the module structure, argument order and
primitive names in Llvm_target in order with the rest of the bindings,
in preparation for adding TargetMachine API.
llvm-svn: 194773
2013-11-15 02:51:44 +00:00
Peter Zotov
b4fb964b99
[OCaml] Fix building of stub libraries
...
llvm-svn: 194772
2013-11-15 02:51:27 +00:00
Peter Zotov
9410f77b9f
[OCaml] Build stub OCaml libraries for all configured targets
...
This allows to only link in the needed targets, reducing binary
size and more importantly link time.
Note that this is an incomplete implementation: currently,
LLVM does not have the plumbing which would allow to conditionally
link in AsmPrinter, AsmParser and Disassembler for the targets
which support them. This should be improved in the future.
llvm-svn: 194670
2013-11-14 06:34:21 +00:00
Peter Zotov
ea5b2e7493
[OCaml] Expose LLVM's fatal error and stacktrace APIs
...
llvm-svn: 194669
2013-11-14 06:34:13 +00:00
Peter Zotov
7b321f832f
[OCaml] Dynamically link LLVM on --enable-shared builds
...
This commit significantly speeds up both bytecode and native
builds of LLVM clients (from ~20 second to sub-second link time),
and allows to invoke LLVM functions from OCaml toplevel.
The behavior for --disable-shared builds is unchanged.
llvm-svn: 194509
2013-11-12 20:55:49 +00:00
Peter Zotov
b1d1388ee3
[OCaml] Fix a typo
...
llvm-svn: 194508
2013-11-12 20:55:42 +00:00
Peter Zotov
18636a8777
[OCaml] Add missing Llvm_target functions
...
llvm-svn: 194382
2013-11-11 14:47:28 +00:00
Peter Zotov
dfa957746c
[OCaml] Accept context explicitly in Llvm_target functions
...
Llvm_target.intptr_type used to implicitly use global context. As
none of other functions in OCaml bindings do, it is changed to
accept context explicitly.
llvm-svn: 194381
2013-11-11 14:47:20 +00:00
Peter Zotov
d52cf17584
[OCaml] Make Llvm_target.DataLayout.t automatically managed
...
This breaks the API by removing Llvm_target.DataLayout.dispose.
llvm-svn: 194380
2013-11-11 14:47:11 +00:00
Peter Zotov
578267fb73
[OCaml] Impement Llvm_irreader, bindings to LLVM assembly parser
...
llvm-svn: 194138
2013-11-06 09:21:25 +00:00
Peter Zotov
d10ae6c527
[OCaml] Implement Llvm.string_of_llvalue
...
llvm-svn: 194136
2013-11-06 09:21:08 +00:00
Peter Zotov
a4b2ac4c30
[OCaml] (PR16190) Add ValueKinds for ConstantDataSequential and subclasses
...
Original patch by David Monniaux
llvm-svn: 194075
2013-11-05 12:55:43 +00:00
Peter Zotov
28f6876ecc
[OCaml] (PR16318) Add missing argument to Llvm.const_intcast
...
llvm-svn: 194065
2013-11-05 11:56:20 +00:00
Peter Zotov
ce7a91b277
[OCaml] (PR11717) Make declare_qualified_global respect address argument
...
Original patch by Jonathan Ragan-Kelley
llvm-svn: 194064
2013-11-05 11:56:13 +00:00
Peter Zotov
04a0e5050f
[OCaml] Properly tag the custom operations of Llvm.llbuilder
...
All other custom operations tags have LLVM prefix.
llvm-svn: 194058
2013-11-05 09:13:46 +00:00
Peter Zotov
a4c2a3e6b6
[OCaml] Llvm_linker: do not use external in module interface
...
Workaround for an OCaml bug:
http://caml.inria.fr/mantis/view.php?id=4166
llvm-svn: 194057
2013-11-05 09:13:39 +00:00
Peter Zotov
7fc270a171
[OCaml] implement Llvm_passmgr_builder, bindings for PassManagerBuilder
...
llvm-svn: 193968
2013-11-04 01:39:42 +00:00
Peter Zotov
0ce99d90be
[OCaml] Documentation
...
llvm-svn: 193967
2013-11-04 01:39:31 +00:00
Peter Zotov
0f22bab63f
[OCaml] Implement missing LLVMCore APIs
...
llvm-svn: 193966
2013-11-04 01:39:26 +00:00
Peter Zotov
9c601e108d
[OCaml] Formatting
...
llvm-svn: 193965
2013-11-04 01:39:18 +00:00
Peter Zotov
311548cdad
[OCaml] Implement Llvm.MemoryBuffer.{of_string,as_string}
...
llvm-svn: 193953
2013-11-03 08:27:45 +00:00
Peter Zotov
6f65440dd2
[OCaml] Fix ABI incompatibility
...
OCaml's type unit is not compatible with C's type void.
llvm-svn: 193952
2013-11-03 08:27:37 +00:00
Peter Zotov
45451cf62a
[OCaml] Implement Llvm_linker, bindings for the IR linker
...
llvm-svn: 193951
2013-11-03 08:27:32 +00:00
Peter Zotov
cbae39416f
[OCaml] Implement Llvm_vectorize bindings
...
llvm-svn: 193950
2013-11-03 08:27:22 +00:00
Peter Zotov
bc7c0d36d0
[OCaml] Llvm_target: fix typo (Int_val instead of Int64_val)
...
llvm-svn: 193948
2013-11-03 08:27:08 +00:00
Peter Zotov
3e0c21ed53
[OCaml] Llvm_scalar_opts: add missing transforms
...
llvm-svn: 193946
2013-11-03 07:54:17 +00:00
Peter Zotov
e4deac7b4a
[OCaml] Llvm_ipo: add missing transforms
...
llvm-svn: 193945
2013-11-03 07:54:08 +00:00
Sylvestre Ledru
4fe1606bb8
OCaml bindings: fix typo
...
Patch by Peter Zotov
llvm-svn: 193851
2013-11-01 02:29:13 +00:00
Sylvestre Ledru
9cd42ec214
OCaml bindings: remove unused DONT_BUILD_RELINKED from Makefiles
...
Patch by Peter Zotov
llvm-svn: 193847
2013-11-01 01:14:24 +00:00
Sylvestre Ledru
d9af1157f6
OCaml bindings: fix typo
...
Patch by Peter Zotov
llvm-svn: 193845
2013-11-01 01:10:58 +00:00
Sylvestre Ledru
a98db32b96
OCaml bindings: fix typo in documentation
...
Patch by Peter Zotov
llvm-svn: 193838
2013-11-01 00:30:02 +00:00
Sylvestre Ledru
493cd8c09b
OCaml bindings: formatting
...
This commit only changes comments and documentation in OCaml bindings. The official name of the language is OCaml, and the usage is now consistent.
Patch by Peter Zotov
llvm-svn: 193836
2013-11-01 00:26:01 +00:00
Andrew Kaylor
31be5eff33
Exposing MCJIT through C API
...
Re-submitting with fix for OCaml dependency problems (removing dependency on SectionMemoryManager when it isn't used).
Patch by Fili Pizlo
llvm-svn: 180720
2013-04-29 17:49:40 +00:00
Andrew Kaylor
25fa9db462
Fixing OCAML bindings for MCJIT
...
llvm-svn: 180232
2013-04-25 00:03:58 +00:00
Micah Villmow
8bbb758f37
Fix a build error for ocaml bindings that was introduced with the TargetData --> DataLayout changes.
...
llvm-svn: 166309
2012-10-19 20:36:22 +00:00
Micah Villmow
edb8656a3c
Fix the ocaml binding breakage from TargetData -> DataLayout changes.
...
llvm-svn: 165406
2012-10-08 17:06:25 +00:00
Micah Villmow
9cfc13d46c
Move TargetData to DataLayout.
...
llvm-svn: 165403
2012-10-08 16:39:34 +00:00
Nuno Lopes
113b8c1007
add support for ocaml 3.12
...
llvm-svn: 163096
2012-09-02 14:42:56 +00:00
Bill Wendling
bd8e5d537d
Remove tabs.
...
llvm-svn: 160482
2012-07-19 00:23:13 +00:00
Benjamin Kramer
57d2c78572
ocaml bindings: landing pad is now the last opcode.
...
llvm-svn: 149997
2012-02-07 18:58:19 +00:00
Jim Grosbach
65e2465550
Tidy up. s/Low Level Virtual Machine/LLVM/.
...
LLVM isn't an acronym anymore.
llvm-svn: 148985
2012-01-25 22:00:23 +00:00
Bob Wilson
d2a0365304
Update OCaml bindings for the new half float type.
...
Patch by Jonathan Ragan-Kelley!
llvm-svn: 147314
2011-12-28 18:51:08 +00:00
Dylan Noblesmith
9e5b178ecc
drop unneeded config.h includes
...
llvm-svn: 147197
2011-12-22 23:04:07 +00:00
Wojciech Matyjewicz
0c48772aaa
Minor fixes in Makefiles for the OCaml bindings:
...
1. Interface files (.mli) are installed before compiled interface
files (.cmi) to preserve timestamp relation.
2. install-meta should use $(OcamlDir) instead of $(ObjDir).
3. Declared some targets as .PHONY.
Patch by Christophe Raffalli.
llvm-svn: 144183
2011-11-09 12:00:39 +00:00
Torok Edwin
3e3ed6d21b
OCaml bindings: add some missing functions and testcases.
...
The C bindings exposed some APIs that weren't covered by the OCaml bindings
llvm-svn: 141997
2011-10-14 20:38:33 +00:00
Torok Edwin
c130831d1a
OCaml bindings: fix attributes to use all 32 bits
...
OCaml's int is limited to 31 bits on 32-bit architectures, so use Int32
explicitly.
Also add an unpack_attr, and {function,param,instr}_attr functions to read
the attributes.
llvm-svn: 141996
2011-10-14 20:38:24 +00:00
Torok Edwin
a33ba40206
OCaml bindings: add icmp_predicate
...
llvm-svn: 141995
2011-10-14 20:38:19 +00:00
Torok Edwin
90e6edf7c4
OCaml bindings: fix infinite recursion on string_of_lltype
...
llvm-svn: 141994
2011-10-14 20:38:14 +00:00
Torok Edwin
a02176c696
bindings: named struct support
...
llvm-svn: 141993
2011-10-14 20:38:08 +00:00
Torok Edwin
229f8d7a9f
ocaml bindings: add findlib META support
...
This makes it easier to link against LLVM libs, especially if you are using
_oasis.
llvm-svn: 141992
2011-10-14 20:38:02 +00:00
Torok Edwin
d09b75734b
ocaml bindings: introduce classify_value
...
llvm-svn: 141991
2011-10-14 20:37:56 +00:00
Torok Edwin
ab6158e2e3
ocaml bindings: add getopcode for constant and instruction, and int64_of_const.
...
llvm-svn: 141990
2011-10-14 20:37:49 +00:00
Torok Edwin
2e9affec15
bindings: tab and indentation fixes of my previous commits
...
llvm-svn: 141989
2011-10-14 20:37:42 +00:00
Torok Edwin
1cd9aded85
ocaml/C bindings: type->isSized()
...
llvm-svn: 141288
2011-10-06 12:13:28 +00:00
Torok Edwin
60c40de81b
add binding to read icmp predicate
...
llvm-svn: 141287
2011-10-06 12:13:20 +00:00
Torok Edwin
fec812e1f1
ocaml/C bindings: getmdstring, add num_op, get_op should work on metadata too
...
llvm-svn: 141286
2011-10-06 12:13:11 +00:00
Torok Edwin
0d5f6ae881
C/OCaml API to retrieve struct name.
...
llvm-svn: 141285
2011-10-06 12:12:50 +00:00
Torok Edwin
d43a5d76f4
ocaml bindings: add llvm_ipo based on IPO.h
...
llvm-svn: 141284
2011-10-06 12:12:27 +00:00
Torok Edwin
0038e0632c
attempt to fix ocaml bindings: landing pads
...
llvm-svn: 140991
2011-10-03 06:41:46 +00:00
Peter Collingbourne
c6bd551db0
Remove the build_unwind function from the OCaml bindings.
...
llvm-svn: 137193
2011-08-10 01:10:17 +00:00
Benjamin Kramer
99d53ff456
Remove InvalidateStructLayoutInfo from the ocaml bindings.
...
llvm-svn: 136582
2011-07-31 01:12:39 +00:00
Nick Lewycky
5f3c4da52d
Update OCaml bindings. Opaque types are gone, type holders are gone and the
...
module operations that operate on type names are gone.
llvm-svn: 134839
2011-07-09 18:29:33 +00:00
Erick Tryzelaar
201b7d75b3
Fix compiling the ocaml kaleidoscope tutorials
...
llvm-svn: 125202
2011-02-09 18:32:02 +00:00
Torok Edwin
5abf51bde0
Fix OCaml bindings crash, PR8847.
...
See http://caml.inria.fr/mantis/view.php?id=4166
If we call only external functions from a module, then its 'let _' bindings
don't get executed, which means that the exceptions don't get registered for use
in the C code.
This in turn causes llvm_raise to call raise_with_arg() with a NULL pointer and
cause a segmentation fault.
The workaround is to declare all 'external' functions as 'val' in these .mli
files.
Also added a separate testcase (the testcase must call only external functions
for the bug to occur).
llvm-svn: 122497
2010-12-23 15:49:26 +00:00
Eric Christopher
a23825a4bb
Try to fix ocaml bindings.
...
llvm-svn: 116021
2010-10-08 00:36:21 +00:00
Dale Johannesen
baa5d045c9
Add X86 MMX type to bitcode and Type.
...
(The Ada bindings probably need it too, but all the
obvious places to change say "do not edit this file".)
llvm-svn: 113618
2010-09-10 20:55:01 +00:00
Benjamin Kramer
1d872f5a9f
Remove unions from the ocaml bindings.
...
llvm-svn: 112363
2010-08-28 09:47:42 +00:00
Bob Wilson
da7be91e1c
Fix a typo.
...
llvm-svn: 111627
2010-08-20 14:54:37 +00:00
Erick Tryzelaar
b4d48706ca
Expose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.
...
llvm-svn: 111625
2010-08-20 14:51:22 +00:00
Erick Tryzelaar
34ce63a464
Fix arguments to ocaml's llvm_params.
...
Thanks to Jianzhou Zhao for finding this.
llvm-svn: 111624
2010-08-20 14:51:16 +00:00
Chris Lattner
2694145e2e
add attributes and module level asm to the ocaml bindings,
...
patch by Patrick Walton!
llvm-svn: 100932
2010-04-10 17:52:58 +00:00
Erick Tryzelaar
f11976538e
Add OCaml tutorial to the examples.
...
llvm-svn: 97966
2010-03-08 19:32:27 +00:00
Erick Tryzelaar
381268e629
Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
...
llvm-svn: 97858
2010-03-06 00:30:06 +00:00
Erick Tryzelaar
ab5ac37c31
Expose the rest of the llvm-c scalar opts to ocaml.
...
llvm-svn: 97685
2010-03-03 23:51:34 +00:00
Erick Tryzelaar
3e64c26b2f
Rename some ocaml functions.
...
llvm-svn: 97684
2010-03-03 23:51:30 +00:00
Erick Tryzelaar
7dd2615503
Expose the external functions for ocaml's execution engine as an optimization.
...
llvm-svn: 97683
2010-03-03 23:51:28 +00:00
Erick Tryzelaar
8f69feac47
Expose alignment and stack alignment attributes to llvm-c and ocaml.
...
llvm-svn: 97682
2010-03-03 23:51:25 +00:00
Erick Tryzelaar
f6fcdbcf9c
Use the ocaml tag 0 since we are just returning an option value.
...
llvm-svn: 97612
2010-03-02 23:59:08 +00:00
Erick Tryzelaar
e9096c8289
Don't use an ocaml keyword in an ocamldoc comment.
...
llvm-svn: 97611
2010-03-02 23:59:05 +00:00
Erick Tryzelaar
94feaafe1e
Expose the optimization level for the jit in ocaml.
...
llvm-svn: 97610
2010-03-02 23:59:03 +00:00
Erick Tryzelaar
98b05d67e9
Remove module providers from ocaml.
...
llvm-svn: 97609
2010-03-02 23:59:00 +00:00
Erick Tryzelaar
a48e627126
Add support for use to ocaml.
...
llvm-svn: 97586
2010-03-02 20:32:32 +00:00
Erick Tryzelaar
84f5ba80df
Add support getting the operands of a User to ocaml.
...
llvm-svn: 97414
2010-02-28 20:45:03 +00:00
Erick Tryzelaar
9190a2af9d
Add support for global aliases to ocaml.
...
llvm-svn: 97413
2010-02-28 20:44:58 +00:00
Erick Tryzelaar
e533a41c24
Add support for inserting inline asm to ocaml.
...
llvm-svn: 97412
2010-02-28 20:44:53 +00:00
Erick Tryzelaar
28db1a3e61
Add support for getting a null pointer.
...
llvm-svn: 97380
2010-02-28 09:46:27 +00:00
Erick Tryzelaar
272d62bc5a
Add a way to look up a type by it's name in a module.
...
llvm-svn: 97379
2010-02-28 09:46:21 +00:00