1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
Commit Graph

70 Commits

Author SHA1 Message Date
Erick Tryzelaar
af1b2037d3 Fix header comment for bindings/ocaml/llvm/Makefile.
llvm-svn: 80526
2009-08-30 23:41:20 +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
7122c0e368 Add the ocaml binding to LLVMBuildAggregateRet.
llvm-svn: 79414
2009-08-19 08:37:00 +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
Erick Tryzelaar
175dd821cc Add an llvm-c function that lets you insert an instruction with a name.
llvm-svn: 79163
2009-08-16 02:20:57 +00:00
Erick Tryzelaar
ed8dffc10b Expose most of the Constant creation functions to ocaml.
llvm-svn: 79162
2009-08-16 02:20:37 +00:00
Erick Tryzelaar
57dcc1e1a3 Expose most of the IRBuilder functionality to ocaml.
llvm-svn: 79161
2009-08-16 02:20:24 +00:00
Erick Tryzelaar
886b353b90 Fix comment in llvm.mli.
llvm-svn: 78591
2009-08-10 19:45:00 +00:00
Erick Tryzelaar
04e1294ada Fix docstring for ocaml binding's const_float.
llvm-svn: 78589
2009-08-10 19:44:45 +00:00
Bob Wilson
7f3ffe1e45 Reorder the "Metadata" entry to match the C bindings.
This fixes a regression in the vmcore.ml dejagnu test.

llvm-svn: 76657
2009-07-21 21:52:57 +00:00
Chris Lattner
eba5c29922 remove dead makefile flags.
llvm-svn: 74064
2009-06-24 05:28:55 +00:00
Nick Lewycky
a9de2f1c81 Give embedded metadata its own type instead of relying on EmptyStructTy.
llvm-svn: 72610
2009-05-30 05:06:04 +00:00
Duncan Sands
5982924b04 Hopefully fix the build for people with ocaml.
llvm-svn: 72254
2009-05-22 09:22:17 +00:00
Duncan Sands
316352b541 Add a getAlignOf helper for getting the ABI alignment of a
type as a target independent constant expression.  I confess
that I didn't check that this method works as intended (though
I did test the equivalent hand-written IR a little).  But what
could possibly go wrong!

llvm-svn: 72213
2009-05-21 15:52:21 +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
Nick Lewycky
d84e130ecf Fix ocaml bindings; add "available_externally" linkage type.
llvm-svn: 68945
2009-04-13 07:02:32 +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
78a53c516d Delete a redundant binding, LLVMHasInitializer.
Please use !LLVMIsDeclaration instead.

llvm-svn: 54572
2008-08-09 02:13:58 +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
a1f7004038 Remove a duplicative binding. Patch by Mahadevan R.
llvm-svn: 51238
2008-05-19 05:47:10 +00:00
Duncan Sands
c5f548f784 Merge LLVMBuilder and FoldingBuilder, calling
the result IRBuilder.  Patch by Dominic Hamon.

llvm-svn: 49604
2008-04-13 06:22:09 +00:00
Gordon Henriksen
44ed585350 Extend the builder interface to use the new instruction positioning code.
This adds support for instruction iterators, as well as rewriting the
builder code to use these new functions. This lets us eliminate the C
bindings for moving around the builder.

Patch by Erick Tryzelaar!

llvm-svn: 48774
2008-03-25 16:26:51 +00:00
Gordon Henriksen
8a5623e18b Another typo.
llvm-svn: 48713
2008-03-23 22:52:51 +00:00
Gordon Henriksen
b62aec2b95 Fix a typo.
llvm-svn: 48712
2008-03-23 22:37:22 +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
caeafc4911 C and Objective Caml bindings for PassManagers.
llvm-svn: 48413
2008-03-16 04:20:44 +00:00
Gordon Henriksen
7ebaba8579 Expose Module::dump via C and Ocaml.
Patch by Erick Tryzelaar.

llvm-svn: 48379
2008-03-14 23:58:56 +00:00
Gordon Henriksen
630bd4f98b Expose Module::dump via C and Ocaml.
Patch by Erick Tryzelaar.

llvm-svn: 48378
2008-03-14 23:52:53 +00:00
Gordon Henriksen
a6d10e21f7 Formatting improvements.
llvm-svn: 48146
2008-03-10 15:47:03 +00:00
Gordon Henriksen
773ba13395 This patch cleans up the OCaml bindings so that they format nicely with
ocamldoc. It does not yet hook into the build system, though.

Patch by Erick Tryzelaar!

llvm-svn: 48095
2008-03-09 07:17:38 +00:00
Gordon Henriksen
5da39fa644 Cleanup some comments in the OCaml bindings.
Patch by Erick Tryzelaar.

llvm-svn: 48014
2008-03-07 19:13:06 +00:00
Gordon Henriksen
bc89f424b7 Fix a typo in llvm.mli noticed by Alain Frisch.
llvm-svn: 45585
2008-01-04 13:21:02 +00:00
Gordon Henriksen
2d87c21eff Trying r45451 again, but this time warning-free on 3.10.x.
llvm-svn: 45452
2007-12-30 18:12:41 +00:00
Gordon Henriksen
28347a471e Remove some lines that are nonportable to Ocaml 3.06.
llvm-svn: 45451
2007-12-30 17:48:11 +00:00
Chris Lattner
7a9b0bf0eb remove attribution from a variety of miscellaneous files.
llvm-svn: 45425
2007-12-29 22:59:10 +00:00
Gordon Henriksen
36da9ea958 Bindings for instruction calling conventions.
llvm-svn: 45422
2007-12-29 20:45:00 +00:00
Chris Lattner
6aece93d5c remove attributions from the rest of the llvm makefiles.
llvm-svn: 45416
2007-12-29 20:11:13 +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
997a800e99 Adding an uninitialized builder constructor to the Ocaml bindings.
llvm-svn: 45362
2007-12-26 21:21:51 +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
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
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
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
0e02790ad5 Fix bug in constructing Ocaml option types in the bindings.
llvm-svn: 44704
2007-12-08 16:55:43 +00:00