| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 45425
|
|
|
|
| |
llvm-svn: 45422
|
|
|
|
| |
llvm-svn: 45416
|
|
|
|
| |
llvm-svn: 45369
|
|
|
|
| |
llvm-svn: 45362
|
|
|
|
| |
llvm-svn: 45352
|
|
|
|
| |
llvm-svn: 45336
|
|
|
|
| |
llvm-svn: 45335
|
|
|
|
| |
llvm-svn: 45236
|
|
|
|
| |
llvm-svn: 45229
|
|
|
|
|
|
| |
to exceptions rather than variants for error handling in Ocaml.
llvm-svn: 45226
|
|
|
|
|
|
| |
for Ocaml-based compilers targeting embedded devices. :)
llvm-svn: 45096
|
|
|
|
| |
llvm-svn: 44899
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thompson. Usage should be something like this:
open Llvm
open Llvm_bitreader
match read_bitcode_file fn with
| Bitreader_failure msg ->
prerr_endline msg
| Bitreader_success m ->
...;
dispose_module m
Compile with: ocamlc llvm.cma llvm_bitreader.cma
ocamlopt llvm.cmxa llvm_bitreader.cmxa
llvm-svn: 44824
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
methods are new to Function:
bool hasCollector() const;
const std::string &getCollector() const;
void setCollector(const std::string &);
void clearCollector();
The assembly representation is as such:
define void @f() gc "shadow-stack" { ...
The implementation uses an on-the-side table to map Functions to
collector names, such that there is no overhead. A StringPool is
further used to unique collector names, which are extremely
likely to be unique per process.
llvm-svn: 44769
|
|
|
|
| |
llvm-svn: 44704
|
|
|
|
|
|
|
| |
to the ocaml bindings. This is required on Windows where 'ln -sf'
actually creates a copy. Thanks to Alain Frisch for noticing this.
llvm-svn: 44547
|
|
|
|
| |
llvm-svn: 44494
|
|
|
|
|
|
| |
Thanks to Török Edvin for helping to track this down.
llvm-svn: 42927
|
|
|
|
| |
llvm-svn: 42760
|
|
|
|
| |
llvm-svn: 42744
|
|
|
|
|
|
|
| |
the Objective Caml 'declare_*' functions to behave more or less like
getOrInsertFunction.
llvm-svn: 42740
|
|
|
|
| |
llvm-svn: 42736
|
|
|
|
| |
llvm-svn: 42713
|
|
|
|
| |
llvm-svn: 42707
|
|
|
|
| |
llvm-svn: 42702
|
|
|
|
|
|
| |
bindings (part le deux).
llvm-svn: 42701
|
|
|
|
| |
llvm-svn: 42698
|
|
|
|
| |
llvm-svn: 42697
|
|
|
|
| |
llvm-svn: 42696
|
|
|
|
| |
llvm-svn: 42668
|
|
|
|
|
|
| |
caml/*.h headers.
llvm-svn: 42599
|
|
|
|
|
|
|
|
|
|
|
| |
stdlib if it's beneath --prefix, and is libdir/ocaml otherwise.
If someone has a better way than this to test whether $B is a path
within $A, I'd love to hear it:
if test "$A" \< "$B" -a "$B" \< "${A}~"
llvm-svn: 42532
|
|
|
|
| |
llvm-svn: 42526
|
|
|
|
| |
llvm-svn: 42385
|
|
|
|
|
|
|
|
|
| |
instruction creation. No support yet for instruction introspection.
Also eliminated allocas from the Ocaml bindings for portability,
and avoided unnecessary casts.
llvm-svn: 42367
|
|
|
|
|
|
|
| |
'dir' exists in 'ocamldep -I dir ...', but recent ones demand that it actually
exists.
llvm-svn: 42245
|
|
|
|
| |
llvm-svn: 42163
|
|
|
|
|
|
|
|
|
|
|
|
| |
(u)intval, because latter are not
present in older caml/mlvalues.h
(e.g. 2004/07/07, 1.48.6.1)
Using this as a workaround for now,
until --without-ocaml works
or we settle on a better solution
llvm-svn: 42160
|
|
|
|
|
|
| |
types are still undefined, causing errors
llvm-svn: 42129
|
|
|
|
| |
llvm-svn: 42101
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
built atop the C language bindings, and user programs can link with them as
such:
# Bytecode
ocamlc -cc g++ llvm.cma llvmbitwriter.cma -o example example.ml
# Native
ocamlopt -cc g++ llvm.cmxa llvmbitwriter.cmxa -o example.opt example.ml
The vmcore.ml test exercises most/all of the APIs thus far bound. Unfortunately,
they're not yet numerous enough to write hello world. But:
$ cat example.ml
(* example.ml *)
open Llvm
open Llvm_bitwriter
let _ =
let filename = Sys.argv.(1) in
let m = create_module filename in
let v = make_int_constant i32_type 42 false in
let g = define_global "hello_world" v m in
if not (write_bitcode_file m filename) then exit 1;
dispose_module m;
$ ocamlc -cc g++ llvm.cma llvm_bitwriter.cma -o example example.ml
File "example.ml", line 11, characters 6-7:
Warning Y: unused variable g.
$ ./example example.bc
$ llvm-dis < example.bc
; ModuleID = '<stdin>'
@hello_world = global i32 42 ; <i32*> [#uses=0]
The ocaml test cases provide effective tests for the C interfaces.
llvm-svn: 42093
|
|
llvm-svn: 42090
|