Nick Lewycky
4f6c397742
Fix test/Bindings/Ocaml/vmcore.ml. When IRBuilder::CreateMalloc was removed,
...
LLVMBuildMalloc was reimplemented but with the bug that it didn't insert the
resulting instruction.
llvm-svn: 84374
2009-10-17 23:52:26 +00:00
Daniel Dunbar
f2e6a64c07
Switch Ocaml to use llvm_supports_binding.
...
llvm-svn: 81665
2009-09-13 01:41:47 +00:00
Erick Tryzelaar
1ea899cc86
Replace ocamlc tests with ocamlopt tests since they're less noisy.
...
There's a bug with ocamlc that uses "char*" instead of "const char*" for
global string variables. This causes g++ to be very noisy when linking
ocamlc programs. That's why the ocaml test used to cat to /dev/null.
ocamlopt doesn't have this problem, so we can get rid of the >/dev/null,
which may obscure some problems.
llvm-svn: 80968
2009-09-03 23:27:31 +00:00
Erick Tryzelaar
c20463016c
Convert the rest of the ocaml types and functions to use context.
...
llvm-svn: 79430
2009-08-19 17:32:24 +00:00
Erick Tryzelaar
fe080c15ce
Allow passing around LLVMContext in ocaml.
...
llvm-svn: 79410
2009-08-19 06:40:29 +00:00
Erick Tryzelaar
5c0946f3a2
Expose creating constant ints and floats from strings to ocaml.
...
llvm-svn: 79214
2009-08-16 23:37:03 +00:00
Dan Gohman
9bdf0bbcea
Fix whitespace expectations to match the new AsmWriter behavior.
...
llvm-svn: 78819
2009-08-12 17:39:04 +00:00
Duncan Sands
8478d08c36
Nounwind is not valid for function return values.
...
llvm-svn: 71082
2009-05-06 13:51:18 +00:00
Duncan Sands
28e07fdaa2
OCaml parameter attribute bindings from PR2752.
...
Incomplete, but better than nothing.
llvm-svn: 71081
2009-05-06 12:21:17 +00:00
Chris Lattner
50be1d46f2
tweak this to accept asmprinter changes. I have no way to verify this, hopefully
...
the buildbot will work.
llvm-svn: 65750
2009-03-01 01:28:40 +00:00
Daniel Dunbar
24b91b1a2c
Update to match space changes in .ll
...
llvm-svn: 64322
2009-02-11 20:48:21 +00:00
Gordon Henriksen
16e190fb8b
[PR2886] Ignore stderr from ocamlc since it prints unresolvable warnings on some platforms.
...
llvm-svn: 57976
2008-10-22 12:41:54 +00:00
Gordon Henriksen
3324b5c3ca
PR2731: C and Ocaml bindings for setTailCall and isTailCall.
...
Based on patch by Giorgos Korfiatis.
llvm-svn: 55570
2008-08-30 16:34:54 +00:00
Gordon Henriksen
2cc861a6c1
Rename some GC classes so that their roll will hopefully be clearer.
...
In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:
Collector -> GCStrategy
CollectorMetadata -> GCFunctionInfo
CollectorModuleMetadata -> GCModuleInfo
CollectorRegistry -> GCRegistry
Function::getCollector -> getGC (setGC, hasGC, clearGC)
Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.
llvm-svn: 54899
2008-08-17 18:44:35 +00:00
Gordon Henriksen
b3806a3386
[PR-2610] Adding Ocaml bindings for Switch::addCase.
...
llvm-svn: 54571
2008-08-09 01:55:52 +00:00
Gordon Henriksen
02d34b6a0c
Don't send checkpoints to stderr for the vmcore.ml test.
...
llvm-svn: 52218
2008-06-11 14:58:01 +00:00
Dan Gohman
2412469191
Remove lingering references to .llx and .tr in the tests.
...
llvm-svn: 51500
2008-05-23 21:15:35 +00:00
Erick Tryzelaar
0efea4df76
Expose ExecutionEngine::getTargetData() to c and ocaml bindings.
...
llvm-svn: 48851
2008-03-27 00:27:14 +00:00
Gordon Henriksen
2d762e28e9
Tests for the instruction iterator bindings.
...
llvm-svn: 48775
2008-03-25 16:35:08 +00:00
Gordon Henriksen
52f3a08237
Objective Caml bindings for basic block, function, global, and arg iterators.
...
llvm-svn: 48711
2008-03-23 22:21:29 +00:00
Gordon Henriksen
15006d5da0
C and Objective Caml bindings for the various getParent methods of the IR.
...
Based on Erick Tryzelaar's patch.
llvm-svn: 48523
2008-03-19 01:11:35 +00:00
Gordon Henriksen
04a60ddcd2
C and Objective Caml bindings for the TargetData class.
...
llvm-svn: 48422
2008-03-16 20:08:03 +00:00
Gordon Henriksen
8c33afc50c
C and Objective Caml bindings for several scalar transforms.
...
Patch originally by Erick Tryzelaar, but has been modified somewhat.
llvm-svn: 48419
2008-03-16 16:32:40 +00:00
Gordon Henriksen
caeafc4911
C and Objective Caml bindings for PassManagers.
...
llvm-svn: 48413
2008-03-16 04:20:44 +00:00
Gordon Henriksen
b75d9e974d
Fixing a bug creating floating point constants of type other
...
than double through the C bindings. Thanks to Tomas Lindquist
Olsen for reporting it.
llvm-svn: 46656
2008-02-02 01:07:50 +00:00
Gordon Henriksen
0f21fdb054
Another backwards compatibility fix.
...
llvm-svn: 45463
2007-12-30 22:48:58 +00:00
Gordon Henriksen
36da9ea958
Bindings for instruction calling conventions.
...
llvm-svn: 45422
2007-12-29 20:45:00 +00:00
Gordon Henriksen
86e98275ff
Adding bindings for target triple and data layout.
...
llvm-svn: 45369
2007-12-27 20:13:47 +00:00
Gordon Henriksen
606ac32019
C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).
...
llvm-svn: 45335
2007-12-23 16:59:28 +00:00
Gordon Henriksen
54ef30cb0e
Fix a partial application typo.
...
llvm-svn: 45317
2007-12-22 19:41:30 +00:00
Gordon Henriksen
4c9ef1e54f
Use a module to group calling convention values, too.
...
llvm-svn: 45236
2007-12-20 00:13:26 +00:00
Gordon Henriksen
fe94b95046
Using modules to group enumerations in Ocaml bindings.
...
llvm-svn: 45229
2007-12-19 22:54:12 +00:00
Gordon Henriksen
46137f1e2e
Adding bindings for memory buffers and module providers. Switching
...
to exceptions rather than variants for error handling in Ocaml.
llvm-svn: 45226
2007-12-19 22:30:40 +00:00
Christopher Lamb
efdf2791b2
Don't forget to print address space qualifiers when printing out the type table! Thanks to Gordon Henriksen for pointing this out.
...
llvm-svn: 45147
2007-12-18 03:49:35 +00:00
Gordon Henriksen
42edc61320
Disabling a RUN line that's broken until addrspace roundtrips
...
through llvm-as|llvm-dis.
llvm-svn: 45097
2007-12-17 16:09:28 +00:00
Gordon Henriksen
ef2c27d164
C and Ocaml bindings for address spaces, for that burgeoning market
...
for Ocaml-based compilers targeting embedded devices. :)
llvm-svn: 45096
2007-12-17 16:08:32 +00:00
Gordon Henriksen
3f070cf3b9
Add (very basic) bindings for ModuleProvider.
...
llvm-svn: 44899
2007-12-12 01:04:30 +00:00
Gordon Henriksen
aff6e2bba2
Adding Ocaml bindings for the bitreader as requested by Sarah
...
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
2007-12-11 00:20:48 +00:00
Gordon Henriksen
5d201e0bcc
Adding a collector name attribute to Function in the IR. These
...
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
2007-12-10 03:18:06 +00:00
Gordon Henriksen
c52a9a365e
Fix a typo noticed by Alain Frisch.
...
llvm-svn: 44493
2007-12-01 20:59:23 +00:00
Gordon Henriksen
84b068154b
C and Objective Caml bindings for PHINode::addIncoming etc.
...
llvm-svn: 42760
2007-10-08 18:14:39 +00:00
Gordon Henriksen
8d8fae73c5
C and Objective Caml bindings for getFunction and getNamedGlobal. Also enhanced
...
the Objective Caml 'declare_*' functions to behave more or less like
getOrInsertFunction.
llvm-svn: 42740
2007-10-08 03:45:09 +00:00
Gordon Henriksen
454d171c26
C and Objective Caml bindings for GlobalVariable::isConstant.
...
llvm-svn: 42736
2007-10-07 17:31:42 +00:00
Gordon Henriksen
99c0e2918b
C and Objective Caml bindings for PATypeHolder.
...
llvm-svn: 42713
2007-10-07 00:13:35 +00:00
Gordon Henriksen
06eeba26c1
Bindings for the verifier.
...
llvm-svn: 42707
2007-10-06 21:00:36 +00:00
Gordon Henriksen
36d61a4b79
Adopting a uniform naming convention for type constructors in
...
bindings (part le deux).
llvm-svn: 42701
2007-10-06 16:56:09 +00:00
Gordon Henriksen
574434313a
Adopting a uniform naming convention for constant constructors in bindings.
...
llvm-svn: 42697
2007-10-06 15:11:06 +00:00
Gordon Henriksen
65ce7c3085
Adding C and Ocaml bindings for ConstantExpr.
...
llvm-svn: 42696
2007-10-06 14:29:36 +00:00
Gordon Henriksen
c73d5c73a6
Added C and Ocaml bindings for functions, basic blocks, and
...
instruction creation. No support yet for instruction introspection.
Also eliminated allocas from the Ocaml bindings for portability,
and avoided unnecessary casts.
llvm-svn: 42367
2007-09-26 20:56:12 +00:00
Gordon Henriksen
0728757caf
Incorporating review feedback for GC verifier patch.
...
llvm-svn: 42163
2007-09-20 16:47:41 +00:00