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
Anders Waldenborg
4c89b14cad
[python] Add negative MemoryBuffer testcase
...
llvm-svn: 153248
2012-03-22 11:23:52 +00:00
Anders Waldenborg
b766e2490d
[python] Add some paths where to find test binary
...
Adds /usr/lib/debug early to list, as some systems (debian) have unstripped libs in there
Adds /lib/i386-linux-gnu for systems that does multiarch (debian)
llvm-svn: 153174
2012-03-21 08:34:58 +00:00
Anders Waldenborg
87b1d460f9
[python] Mark get_test_binary as not being a test
...
get_test_binary is a helper method, not a test, make sure nosetests
doesn't pick it up as a test.
llvm-svn: 153173
2012-03-21 08:18:19 +00:00
Gregory Szorc
21c9f38977
[llvm.py] Implement disassembler interface
...
It doesn't currently support the op info and symbol lookup callbacks,
but it is better than nothing.
llvm-svn: 152527
2012-03-11 02:32:56 +00:00
Gregory Szorc
11d2e18405
Revert "[llvm.py] Implement interface to enhanced disassembler"
...
Chris Lattner says the edis interface is going away. It doesn't make
sense to land something that will go away in the near future.
llvm-svn: 152508
2012-03-10 21:44:03 +00:00
Gregory Szorc
6174a67e04
[llvm.py] Implement interface to enhanced disassembler
...
This requires a C++ change to EDDisassembler's ctor to function properly
(the llvm::InitializeAll* functions aren't being called currently and
there is no way to call them from Python).
Code is partially tested and works well enough for initial commit. There
are probably many small bugs.
llvm-svn: 152506
2012-03-10 21:05:05 +00:00
Gregory Szorc
053354edce
[llvm.py] Make LLVMObject.__del__ work if called during __init__
...
llvm-svn: 152505
2012-03-10 21:01:14 +00:00
Gregory Szorc
eace54fcb4
[llvm.py] Define enumerations from Core.h; add OpCode class
...
llvm-svn: 152483
2012-03-10 05:50:56 +00:00
Gregory Szorc
385a2532e0
[llvm.py] Implement interface to object files
...
It is now possible to load object files and scan over sections, symbols,
and relocations! Includes test code with partial coverage.
llvm-svn: 152482
2012-03-10 04:41:24 +00:00
Gregory Szorc
3a08300585
[llvm.py] Make ObjectFile destructor work
...
Previous code had a double free in MemoryBuffer. The tests now pass.
llvm-svn: 152422
2012-03-09 18:56:33 +00:00
Gregory Szorc
c04bbd27af
[llvm.py] Initial skeleton for Python LLVM bindings
...
This contains a semi-functional skeleton for the implementation of the
LLVM bindings for Python.
The API for the Object.h interface is roughly designed but not
implemented. MemoryBufferRef is implemented and actually appears to
work!
The ObjectFile unit test fails with a segmentation fault because the
LLVM library isn't being properly initialized. The build system doesn't
know about this code yet, so no alerts should fire.
llvm-svn: 152397
2012-03-09 09:07:35 +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
Daniel Dunbar
27a7489a03
LLVMBuild: Remove trailing newline, which irked me.
...
llvm-svn: 146409
2011-12-12 19:48:00 +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
Daniel Dunbar
bf9bba47a1
build: Add initial cut at LLVMBuild.txt files.
...
llvm-svn: 143634
2011-11-03 18:53:17 +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
Duncan Sands
c288cda3d5
Remove the Ada bindings which are unmaintained and unused. The project which
...
was the main putative user of the binding is actually maintaining its own
different binding, see http://git.ada.cx/cgi-bin/cgit.cgi/draco.git/
llvm-svn: 113960
2010-09-15 08:17:10 +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
Bill Wendling
3aeedd1e5a
- Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.
...
- Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp.
llvm-svn: 111952
2010-08-24 20:00:52 +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