summaryrefslogtreecommitdiff
path: root/bindings
AgeCommit message (Collapse)AuthorFilesLines
2014-05-01[OCaml] Add an ocamlfind package llvm.all_backends.Peter Zotov6-1/+83
This package is useful for architecture-independent tools like llc. Patch by Jacques-Pascal Deplaix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207793 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-25[python] Fix getting section contents.Anders Waldenborg2-2/+12
The returnvalue was handled as c_char_p which ment that ctypes handled it as a NUL-terminated string making it cut the contents at first NUL (or even worse - overrunning the buffer if it doesn't contain a NUL). Differential Revision: http://reviews.llvm.org/D3474 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207199 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-23[python] Fix python bindings testsAnders Waldenborg1-1/+0
Broke after the changes related to the LLVMGetSymbolFileOffset removal in r206750 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207018 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-21Convert getFileOffset to getOffset and move it to its only user.Rafael Espindola1-12/+0
We normally don't drop functions from the C API's, but in this case I think we can: * The old implementation of getFileOffset was fairly broken * The introduction of LLVMGetSymbolFileOffset was itself a C api breaking change as it removed LLVMGetSymbolOffset. * It is an incredibly specialized use case. The only reason MCJIT needs it is because of its odd position of being a dynamic linker of .o files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206750 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-23[python-bindings] Remove some cruft that snuck in.Michael Gottesman1-4/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201966 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-22[python-bindings] Added OpCode like support for all enumerations with unittests.Michael Gottesman2-37/+139
Also fixed some trailing whitespace issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201929 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20Makefile.ocaml: Tweak to use --system-libs.NAKAMURA Takumi1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197758 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20Fix documentation typosAlp Toker2-3/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197757 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-28[OCaml] Add a slash accidentally omitted from MakefilePeter Zotov1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195912 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-27[OCaml] Embed rpath into stub libraries and native executablesPeter Zotov1-3/+12
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195834 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-26[OCaml] Embed the flags necessary for linking with libLLVM.so into .cmxa filesPeter Zotov1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195782 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21[OCaml] Unbreak make install by providing ocamldoc targetPeter Zotov1-1/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195336 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17python: Fix check for disasm creation failureAnders Waldenborg2-1/+5
Check should be for pointer being NULL, not what it points to. Also adds a test for this case. Reviewed By: indygreg Differential Revision: http://llvm-reviews.chandlerc.com/D1878 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194965 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17python: Properly initialize before trying to create disasmAnders Waldenborg1-0/+26
As the "LLVMInitializeAll*" functions are not available as symbols in the shared library they can't be used, and as a workaround a list of the targets is kept and the individual symbols tried. As soon as the "All"-functions are changed to proper symbols (as opposed to static inlines in the headers) this hack will be replace with simple calls to the corresponding "LLVMInitializeAll*" functions. Reviewed By: indygreg CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1879 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194964 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15[OCaml] Add Target and TargetMachine bindings to Llvm_targetPeter Zotov3-1/+464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194774 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15[OCaml] Refactor Llvm_target interfacePeter Zotov6-180/+186
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194773 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15[OCaml] Fix building of stub librariesPeter Zotov3-8/+8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194772 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-14[OCaml] Build stub OCaml libraries for all configured targetsPeter Zotov6-0/+195
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194670 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-14[OCaml] Expose LLVM's fatal error and stacktrace APIsPeter Zotov3-0/+47
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194669 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12[OCaml] Dynamically link LLVM on --enable-shared buildsPeter Zotov1-1/+67
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194509 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12[OCaml] Fix a typoPeter Zotov1-6/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194508 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-11[OCaml] Add missing Llvm_target functionsPeter Zotov3-0/+28
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194382 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-11[OCaml] Accept context explicitly in Llvm_target functionsPeter Zotov3-5/+7
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194381 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-11[OCaml] Make Llvm_target.DataLayout.t automatically managedPeter Zotov5-43/+68
This breaks the API by removing Llvm_target.DataLayout.dispose. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194380 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-06[OCaml] Impement Llvm_irreader, bindings to LLVM assembly parserPeter Zotov6-1/+126
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194138 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-06[OCaml] Implement Llvm.string_of_llvaluePeter Zotov3-0/+15
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194136 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-05[OCaml] (PR16190) Add ValueKinds for ConstantDataSequential and subclassesPeter Zotov3-0/+8
Original patch by David Monniaux git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194075 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-05[OCaml] (PR16318) Add missing argument to Llvm.const_intcastPeter Zotov3-5/+14
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194065 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-05[OCaml] (PR11717) Make declare_qualified_global respect address argumentPeter Zotov1-1/+2
Original patch by Jonathan Ragan-Kelley git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194064 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-05[OCaml] Properly tag the custom operations of Llvm.llbuilderPeter Zotov1-1/+1
All other custom operations tags have LLVM prefix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194058 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-05[OCaml] Llvm_linker: do not use external in module interfacePeter Zotov1-2/+1
Workaround for an OCaml bug: http://caml.inria.fr/mantis/view.php?id=4166 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194057 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-04[OCaml] implement Llvm_passmgr_builder, bindings for PassManagerBuilderPeter Zotov6-1/+227
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193968 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-04[OCaml] DocumentationPeter Zotov2-7/+19
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193967 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-04[OCaml] Implement missing LLVMCore APIsPeter Zotov3-62/+349
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193966 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-04[OCaml] FormattingPeter Zotov3-172/+48
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193965 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-03[OCaml] Implement Llvm.MemoryBuffer.{of_string,as_string}Peter Zotov3-0/+33
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193953 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-03[OCaml] Fix ABI incompatibilityPeter Zotov2-1/+8
OCaml's type unit is not compatible with C's type void. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193952 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-03[OCaml] Implement Llvm_linker, bindings for the IR linkerPeter Zotov6-1/+131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193951 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-03[OCaml] Implement Llvm_vectorize bindingsPeter Zotov6-1/+106
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193950 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-03[OCaml] Llvm_target: fix typo (Int_val instead of Int64_val)Peter Zotov1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193948 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-03[OCaml] Llvm_scalar_opts: add missing transformsPeter Zotov3-0/+13
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193946 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-03[OCaml] Llvm_ipo: add missing transformsPeter Zotov3-0/+12
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193945 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01OCaml bindings: fix typoSylvestre Ledru1-1/+1
Patch by Peter Zotov git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193851 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01OCaml bindings: remove unused DONT_BUILD_RELINKED from MakefilesSylvestre Ledru2-2/+0
Patch by Peter Zotov git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193847 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01OCaml bindings: fix typoSylvestre Ledru2-2/+2
Patch by Peter Zotov git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193845 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01OCaml bindings: fix typo in documentationSylvestre Ledru1-1/+1
Patch by Peter Zotov git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193838 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01OCaml bindings: formattingSylvestre Ledru24-74/+44
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193836 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11[python-bindings] Added support for getting/setting operands of values and ↵Michael Gottesman2-3/+39
getting the number of operands of a value. Also in the process did some cleanups for BasicBlock. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190477 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11[python-bindings] Added support for iterating over a basic blocks ↵Michael Gottesman2-0/+99
instructions, getting their name/dumping them, f/b iteration. Tests are included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190475 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11[python-bindings] Added support for iterating over a function's basic ↵Michael Gottesman2-0/+105
blocks, dumping/getting names of those bb, f/w iteration. Tests are included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190473 91177308-0d34-0410-b5e6-96231b3b80d8