summaryrefslogtreecommitdiff
path: root/bindings
Commit message (Collapse)AuthorAge
* [OCaml] Build stub OCaml libraries for all configured targetsPeter Zotov2013-11-14
| | | | | | | | | | | | 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
* [OCaml] Expose LLVM's fatal error and stacktrace APIsPeter Zotov2013-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194669 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Dynamically link LLVM on --enable-shared buildsPeter Zotov2013-11-12
| | | | | | | | | | 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
* [OCaml] Fix a typoPeter Zotov2013-11-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194508 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Add missing Llvm_target functionsPeter Zotov2013-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194382 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Accept context explicitly in Llvm_target functionsPeter Zotov2013-11-11
| | | | | | | | 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
* [OCaml] Make Llvm_target.DataLayout.t automatically managedPeter Zotov2013-11-11
| | | | | | 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
* [OCaml] Impement Llvm_irreader, bindings to LLVM assembly parserPeter Zotov2013-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194138 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Implement Llvm.string_of_llvaluePeter Zotov2013-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194136 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] (PR16190) Add ValueKinds for ConstantDataSequential and subclassesPeter Zotov2013-11-05
| | | | | | Original patch by David Monniaux git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194075 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] (PR16318) Add missing argument to Llvm.const_intcastPeter Zotov2013-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194065 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] (PR11717) Make declare_qualified_global respect address argumentPeter Zotov2013-11-05
| | | | | | Original patch by Jonathan Ragan-Kelley git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194064 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Properly tag the custom operations of Llvm.llbuilderPeter Zotov2013-11-05
| | | | | | 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
* [OCaml] Llvm_linker: do not use external in module interfacePeter Zotov2013-11-05
| | | | | | | 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
* [OCaml] implement Llvm_passmgr_builder, bindings for PassManagerBuilderPeter Zotov2013-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193968 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] DocumentationPeter Zotov2013-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193967 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Implement missing LLVMCore APIsPeter Zotov2013-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193966 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] FormattingPeter Zotov2013-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193965 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Implement Llvm.MemoryBuffer.{of_string,as_string}Peter Zotov2013-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193953 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Fix ABI incompatibilityPeter Zotov2013-11-03
| | | | | | 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
* [OCaml] Implement Llvm_linker, bindings for the IR linkerPeter Zotov2013-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193951 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Implement Llvm_vectorize bindingsPeter Zotov2013-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193950 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Llvm_target: fix typo (Int_val instead of Int64_val)Peter Zotov2013-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193948 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Llvm_scalar_opts: add missing transformsPeter Zotov2013-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193946 91177308-0d34-0410-b5e6-96231b3b80d8
* [OCaml] Llvm_ipo: add missing transformsPeter Zotov2013-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193945 91177308-0d34-0410-b5e6-96231b3b80d8
* OCaml bindings: fix typoSylvestre Ledru2013-11-01
| | | | | | | | Patch by Peter Zotov git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193851 91177308-0d34-0410-b5e6-96231b3b80d8
* OCaml bindings: remove unused DONT_BUILD_RELINKED from MakefilesSylvestre Ledru2013-11-01
| | | | | | | | | Patch by Peter Zotov git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193847 91177308-0d34-0410-b5e6-96231b3b80d8
* OCaml bindings: fix typoSylvestre Ledru2013-11-01
| | | | | | | | Patch by Peter Zotov git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193845 91177308-0d34-0410-b5e6-96231b3b80d8
* OCaml bindings: fix typo in documentationSylvestre Ledru2013-11-01
| | | | | | | | Patch by Peter Zotov git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193838 91177308-0d34-0410-b5e6-96231b3b80d8
* OCaml bindings: formattingSylvestre Ledru2013-11-01
| | | | | | | | | | 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
* [python-bindings] Added support for getting/setting operands of values and ↵Michael Gottesman2013-09-11
| | | | | | | | 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
* [python-bindings] Added support for iterating over a basic blocks ↵Michael Gottesman2013-09-11
| | | | | | | | 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
* [python-bindings] Added support for iterating over a function's basic ↵Michael Gottesman2013-09-11
| | | | | | | | 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
* [python-bindings] Added support for getting a module's functions, iterating ↵Michael Gottesman2013-09-11
| | | | | | | | f/b over said functions, dumping/print name of functions. Tests are included as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190471 91177308-0d34-0410-b5e6-96231b3b80d8
* [python-bindings] Export OpCode from core.py.Michael Gottesman2013-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190468 91177308-0d34-0410-b5e6-96231b3b80d8
* [python-bindings] Added test for reading a module from bitcode.Michael Gottesman2013-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190467 91177308-0d34-0410-b5e6-96231b3b80d8
* [python-bindings] Fixed 3 test failures caused by typos.Michael Gottesman2013-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190465 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed typo.Michael Gottesman2013-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190459 91177308-0d34-0410-b5e6-96231b3b80d8
* [python-bindings] Added code for loading a module from bitcode, getset its ↵Michael Gottesman2013-09-11
| | | | | | datalayout, getset its target, dump it, print it to a file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190458 91177308-0d34-0410-b5e6-96231b3b80d8
* [python-bindings] Added bindings for LLVMContextRef and a test for creating ↵Michael Gottesman2013-09-11
| | | | | | a new context or getting the global context. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190457 91177308-0d34-0410-b5e6-96231b3b80d8
* [python-bindings] Implemented the PassRegistry class and the calls to ↵Michael Gottesman2013-09-11
| | | | | | initialize/shutdown llvm. Also included an initialize_llvm declaration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190456 91177308-0d34-0410-b5e6-96231b3b80d8
* [python-bindings] Removed unused import byref from llvm/disassembler.py.Michael Gottesman2013-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190455 91177308-0d34-0410-b5e6-96231b3b80d8
* [python-bindings] Changed test_memory_buffer_create_from_file to just use ↵Michael Gottesman2013-09-10
| | | | | | the generic provided test_file instead of a binary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190389 91177308-0d34-0410-b5e6-96231b3b80d8
* [python bindings] Added code to get the length of a memory buffer. Tests are ↵Michael Gottesman2013-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | included. This is a part of a series of patches that have been sitting fallow on a personal branch that I have been messing with for a bit. The patches start to flesh out the python llvm-c wrapper to the point where you can: 1. Load Modules from Bitcode/Dump/Print them. 2. Iterate over Functions from those modules/get their names/dump them. 3. Iterate over the BasicBlocks from said function/get the BB's name/dump it. 4. Iterate over the Instructions in said BasicBlocks/get the instructions name/dump the instruction. My main interest in developing this was to be able to gather statistics about LLVM IR using python scripts to speed up statistical profiling of different IR level transformations (hence the focus on printing/dumping/getting names). This is a gift from me to the LLVM community = ). I am going to be committing the patches slowly over the next bit as I have time to prepare the patches. The overall organization follows the c-api like the bindings that are already implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190388 91177308-0d34-0410-b5e6-96231b3b80d8
* We're in 3.4 land now.Bill Wendling2013-05-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181350 91177308-0d34-0410-b5e6-96231b3b80d8
* Exposing MCJIT through C APIAndrew Kaylor2013-04-29
| | | | | | | | | | Re-submitting with fix for OCaml dependency problems (removing dependency on SectionMemoryManager when it isn't used). Patch by Fili Pizlo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180720 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing OCAML bindings for MCJITAndrew Kaylor2013-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180232 91177308-0d34-0410-b5e6-96231b3b80d8
* [python] Add markup option to disassemblerGregory Szorc2012-12-01
| | | | | | Patch contributed by Wladimir J. van der Laan <laanwj@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169102 91177308-0d34-0410-b5e6-96231b3b80d8
* [python] fix get_library()Anders Waldenborg2012-11-20
| | | | | | | | | | | | | | | | | | | | | | | Before this fix, the LLVM Python bindings on SVN trunk always fail with: Exception: LLVM shared library not found! since it's still looking for a library named "LLVM-3.1svn". Besides updating the LLVM version in the library name, this patch also changes llvm.get_library() to make it possible to run the unit tests without installing the LLVM shared library into a default linker search path. e.g. after this patch, running the llvm/python unit tests with: LD_LIBRARY_PATH=../build/Debug+Asserts/lib nosetests -v bindings/python/llvm/tests/ would work on Linux. Patch from Scott Tsai (with some minor modifications) Patch also acked by Gregory Szorc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168390 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a build error for ocaml bindings that was introduced with the TargetData ↵Micah Villmow2012-10-19
| | | | | | --> DataLayout changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166309 91177308-0d34-0410-b5e6-96231b3b80d8