Commit Graph

337 Commits

Author SHA1 Message Date
Peter Collingbourne
bdfd937473 Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith.
Fixes llgo following Duncan's changes to debug info in r231082. llgo needs
to replace composite types, which are no longer represented using MDTuple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231416 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05 22:55:38 +00:00
Juergen Ributzka
0a5c3015f8 Restore LLVMLinkModules C API until it is properly deprecated.
Add the enum "LLVMLinkerMode" back for backwards-compatibility and add the
linker mode parameter back to the "LLVMLinkModules" function. The paramter is
ignored and has no effect.

Patch provided by: Filip Pizlo
Reviewed by: Rafael and Sean

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230988 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-02 18:59:38 +00:00
Andrew Wilkins
66c89ee492 bindings/go: expose DIBuilder::createReplaceableCompositeType
Summary:
We extend the DIBuilder type, adding a method for creating
replaceable composite types. This is necessary for creating
debug info describing self-referential types.

Reviewers: pcc

Reviewed By: pcc

Subscribers: axw, llvm-commits

Differential Revision: http://reviews.llvm.org/D7851

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230951 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-02 12:27:04 +00:00
Chandler Carruth
417c5c172c [PM] Remove the old 'PassManager.h' header file at the top level of
LLVM's include tree and the use of using declarations to hide the
'legacy' namespace for the old pass manager.

This undoes the primary modules-hostile change I made to keep
out-of-tree targets building. I sent an email inquiring about whether
this would be reasonable to do at this phase and people seemed fine with
it, so making it a reality. This should allow us to start bootstrapping
with modules to a certain extent along with making it easier to mix and
match headers in general.

The updates to any code for users of LLVM are very mechanical. Switch
from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h".
Qualify the types which now produce compile errors with "legacy::". The
most common ones are "PassManager", "PassManagerBase", and
"FunctionPassManager".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229094 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 10:01:29 +00:00
Chandler Carruth
09c9b6f0c4 Re-sort the #include lines in bindings and examples which I managed to
miss previously.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229089 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 09:14:30 +00:00
Peter Zotov
f6943689d2 [OCaml] Add Llvm.build_empty_phi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228395 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-06 13:42:03 +00:00
Alexey Samsonov
282314741d SpecialCaseList: Add support for parsing multiple input files.
Summary:
This change allows users to create SpecialCaseList objects from
multiple local files. This is needed to implement a proper support
for -fsanitize-blacklist flag (allow users to specify multiple blacklists,
in addition to default blacklist, see PR22431).

DFSan can also benefit from this change, as DFSan instrumentation pass now
accepts ABI-lists both from -fsanitize-blacklist= and -mllvm -dfsan-abilist flags.

Go bindings are fixed accordingly.

Test Plan: regression test suite

Reviewers: pcc

Subscribers: llvm-commits, axw, kcc

Differential Revision: http://reviews.llvm.org/D7367

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228155 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04 17:39:48 +00:00
Duncan P. N. Exon Smith
f9eaea701d IR: Return unique_ptr from MDNode::getTemporary()
Change `MDTuple::getTemporary()` and `MDLocation::getTemporary()` to
return (effectively) `std::unique_ptr<T, MDNode::deleteTemporary>`, and
clean up call sites.  (For now, `DIBuilder` call sites just call
`release()` immediately.)

There's an accompanying change in each of clang and polly to use the new
API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226504 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-19 21:30:18 +00:00
Duncan P. N. Exon Smith
8ec0aee3b4 IR: Remove MDNodeFwdDecl
Remove `MDNodeFwdDecl` (as promised in r226481).  Aside from API
changes, there's no real functionality change here.
`MDNode::getTemporary()` now forwards to `MDTuple::getTemporary()`,
which returns a tuple with `isTemporary()` equal to true.

The main point is that we can now add temporaries of other `MDNode`
subclasses, needed for PR22235 (I introduced `MDNodeFwdDecl` in the
first place because I didn't recognize this need, and thought they were
only needed to handle forward references).

A few things left out of (or highlighted by) this commit:

  - I've had to remove the (few) uses of `std::unique_ptr<>` to deal
    with temporaries, since the destructor is no longer public.
    `getTemporary()` should probably return the equivalent of
    `std::unique_ptr<T, MDNode::deleteTemporary>`.
  - `MDLocation::getTemporary()` doesn't exist yet (worse, it actually
    does exist, but does the wrong thing: `MDNode::getTemporary()` is
    inherited and returns an `MDTuple`).
  - `MDNode` now only has one subclass, `UniquableMDNode`, and the
    distinction between them is actually somewhat confusing.

I'll fix those up next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226501 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-19 20:36:39 +00:00
Peter Zotov
17486ba4bf [OCaml] Allow out-of-tree builds of LLVM bindings.
In order to use this feature, configure LLVM as usual,
but then build and install it as:

   make all install SYSTEM_LLVM_CONFIG=llvm-config

where llvm-config is the llvm-config binary installed on your
system (possibly llvm-config-VERSION on e.g. Debian).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225787 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 12:17:56 +00:00
Peter Zotov
464a52227c [OCaml] Use $CAMLORIGIN, an rpath-$ORIGIN-like mechanism in OCaml.
As a result, installations of LLVM in non-standard locations
will not require passing custom -ccopt -L flags when building
the binary, nor absolute paths would be embedded in the cma/cmxa
files. Additionally, the executables will not require changes
to LD_LIBRARY_PATH, although CAML_LD_LIBRARY_PATH still
has to be set for ocamlc without -custom.

See http://caml.inria.fr/mantis/view.php?id=6642.
Note that the patch is approved, but not merged yet.
It will be released in 4.03 and likely 4.02.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225778 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-13 09:47:59 +00:00
Peter Zotov
a2cb627a04 [OCaml] [cmake] Use LLVM_LIBRARY_DIR instead of LLVM_LIBRARY_OUTPUT_INTDIR.
The latter variable is internal.

Original patch by Ramkumar Ramachandra <artagnon@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224977 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-30 03:24:07 +00:00
Peter Zotov
0357f8735e [OCaml] Expose Llvm_executionengine.get_{global_value,function}_address.
Patch by Ramkumar Ramachandra <artagnon@gmail.com>.

Also remove Llvm_executionengine.get_pointer_to_global, as it
is actually deprecated and didn't appear in a stable release.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224801 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-24 01:52:51 +00:00
Rafael Espindola
d27b926340 Finish removing DestroySource.
Fixes pr21901.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224782 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-23 19:16:45 +00:00
Peter Zotov
127090dd75 [OCaml] PR22014: OCaml bindings didn't link to libLLVM-*.so with -Wl,--as-needed
Patch by Evangelos Foutras <evangelos@foutrelis.com>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224766 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-23 13:09:59 +00:00
Peter Collingbourne
e881eef2db Go bindings: introduce Value.ConstantAsMetadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224179 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-13 02:25:57 +00:00
Peter Collingbourne
3a404314fe Go bindings: introduce llvm.TemporaryMDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224178 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-13 02:25:54 +00:00
Peter Collingbourne
e9e0f3718c Go bindings: introduce Metadata.ReplaceAllUsesWith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224177 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-13 02:25:51 +00:00
Peter Collingbourne
eb8bf790eb Go bindings: expose the Metadata type.
Also modifies SetCurrentDebugLocation to take individual arguments rather
than an MDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224176 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-13 02:25:49 +00:00
Peter Collingbourne
77f0100f1f Go bindings: remove contextless metadata bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224175 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-13 02:25:45 +00:00
Duncan P. N. Exon Smith
dad20b2ae2 IR: Split Metadata from Value
Split `Metadata` away from the `Value` class hierarchy, as part of
PR21532.  Assembly and bitcode changes are in the wings, but this is the
bulk of the change for the IR C++ API.

I have a follow-up patch prepared for `clang`.  If this breaks other
sub-projects, I apologize in advance :(.  Help me compile it on Darwin
I'll try to fix it.  FWIW, the errors should be easy to fix, so it may
be simpler to just fix it yourself.

This breaks the build for all metadata-related code that's out-of-tree.
Rest assured the transition is mechanical and the compiler should catch
almost all of the problems.

Here's a quick guide for updating your code:

  - `Metadata` is the root of a class hierarchy with three main classes:
    `MDNode`, `MDString`, and `ValueAsMetadata`.  It is distinct from
    the `Value` class hierarchy.  It is typeless -- i.e., instances do
    *not* have a `Type`.

  - `MDNode`'s operands are all `Metadata *` (instead of `Value *`).

  - `TrackingVH<MDNode>` and `WeakVH` referring to metadata can be
    replaced with `TrackingMDNodeRef` and `TrackingMDRef`, respectively.

    If you're referring solely to resolved `MDNode`s -- post graph
    construction -- just use `MDNode*`.

  - `MDNode` (and the rest of `Metadata`) have only limited support for
    `replaceAllUsesWith()`.

    As long as an `MDNode` is pointing at a forward declaration -- the
    result of `MDNode::getTemporary()` -- it maintains a side map of its
    uses and can RAUW itself.  Once the forward declarations are fully
    resolved RAUW support is dropped on the ground.  This means that
    uniquing collisions on changing operands cause nodes to become
    "distinct".  (This already happened fairly commonly, whenever an
    operand went to null.)

    If you're constructing complex (non self-reference) `MDNode` cycles,
    you need to call `MDNode::resolveCycles()` on each node (or on a
    top-level node that somehow references all of the nodes).  Also,
    don't do that.  Metadata cycles (and the RAUW machinery needed to
    construct them) are expensive.

  - An `MDNode` can only refer to a `Constant` through a bridge called
    `ConstantAsMetadata` (one of the subclasses of `ValueAsMetadata`).

    As a side effect, accessing an operand of an `MDNode` that is known
    to be, e.g., `ConstantInt`, takes three steps: first, cast from
    `Metadata` to `ConstantAsMetadata`; second, extract the `Constant`;
    third, cast down to `ConstantInt`.

    The eventual goal is to introduce `MDInt`/`MDFloat`/etc. and have
    metadata schema owners transition away from using `Constant`s when
    the type isn't important (and they don't care about referring to
    `GlobalValue`s).

    In the meantime, I've added transitional API to the `mdconst`
    namespace that matches semantics with the old code, in order to
    avoid adding the error-prone three-step equivalent to every call
    site.  If your old code was:

        MDNode *N = foo();
        bar(isa             <ConstantInt>(N->getOperand(0)));
        baz(cast            <ConstantInt>(N->getOperand(1)));
        bak(cast_or_null    <ConstantInt>(N->getOperand(2)));
        bat(dyn_cast        <ConstantInt>(N->getOperand(3)));
        bay(dyn_cast_or_null<ConstantInt>(N->getOperand(4)));

    you can trivially match its semantics with:

        MDNode *N = foo();
        bar(mdconst::hasa               <ConstantInt>(N->getOperand(0)));
        baz(mdconst::extract            <ConstantInt>(N->getOperand(1)));
        bak(mdconst::extract_or_null    <ConstantInt>(N->getOperand(2)));
        bat(mdconst::dyn_extract        <ConstantInt>(N->getOperand(3)));
        bay(mdconst::dyn_extract_or_null<ConstantInt>(N->getOperand(4)));

    and when you transition your metadata schema to `MDInt`:

        MDNode *N = foo();
        bar(isa             <MDInt>(N->getOperand(0)));
        baz(cast            <MDInt>(N->getOperand(1)));
        bak(cast_or_null    <MDInt>(N->getOperand(2)));
        bat(dyn_cast        <MDInt>(N->getOperand(3)));
        bay(dyn_cast_or_null<MDInt>(N->getOperand(4)));

  - A `CallInst` -- specifically, intrinsic instructions -- can refer to
    metadata through a bridge called `MetadataAsValue`.  This is a
    subclass of `Value` where `getType()->isMetadataTy()`.

    `MetadataAsValue` is the *only* class that can legally refer to a
    `LocalAsMetadata`, which is a bridged form of non-`Constant` values
    like `Argument` and `Instruction`.  It can also refer to any other
    `Metadata` subclass.

(I'll break all your testcases in a follow-up commit, when I propagate
this change to assembly.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223802 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-09 18:38:53 +00:00
Eric Christopher
73271f0853 Add bindings for the rest of the MCJIT options that we previously
had support for. We're still missing a binding for an MCJIT
memory manager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223153 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-02 21:09:01 +00:00
Peter Zotov
39f6e73888 [OCaml] Add Llvm.mdnull.
Patch by Gideon Smeding <gideon.smeding@3ds.com>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223129 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-02 17:35:26 +00:00
Peter Zotov
787a41926a [OCaml] Move Llvm.clone_module to its own Llvm_transform_utils module.
This way most code won't link this (substantially large) library,
if compiled statically with LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223072 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 19:50:39 +00:00
Peter Zotov
a0a26f222b [OCaml] [cmake] Add CMake buildsystem for OCaml.
Closes PR15325.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223071 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 19:50:23 +00:00
Eric Christopher
01189819fa Reformat with gofmt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222806 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-26 02:57:33 +00:00
Eric Christopher
2d3f97d4de Make SetMCJITOptimizationLevel more of a method and pass options
as a reference. Move closer to the type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222805 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-26 02:54:24 +00:00
Eric Christopher
82ec8476af Make sure that the go bindings call LLVMInitializeMCJITCompilerOptions
so that they initialize the code generation model to the correct
(non-zero) default model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222804 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-26 02:27:46 +00:00
Peter Collingbourne
5a4bf227a9 Go bindings: add DIBuilder.InsertValueAtEnd
Expose llvm::DIBuilder::insertDbgValueIntrinsic as
DIBuilder.InsertValueAtEnd in the Go bindings, to support attaching
debug metadata to register values.

Patch by Andrew Wilkins!

Differential Revision: http://reviews.llvm.org/D6374

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222790 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-25 21:05:04 +00:00
Peter Collingbourne
2dea1fe38d Expose LLVM version string via macro in llvm-config.h, and modify Go bindings
to make use of it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222307 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-19 03:34:17 +00:00
Peter Zotov
89a66f4ae5 [OCaml] Fix mismatched CAMLparam/CAMLreturn.
Also, revert r221142--it was an incorrect fix to this bug
which fixed tests by accident.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221149 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 11:47:14 +00:00
Peter Zotov
099e59a6c1 [OCaml] Add -g on DEBUG_SYMBOLS=1, not ENABLE_OPTIMIZED.
Thanks echristo for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221145 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 10:06:19 +00:00
Peter Zotov
49fd9044f7 [OCaml] Don't use deprecated non-caml_namespaced functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221143 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:47 +00:00
Peter Zotov
13fd7205fa [OCaml] Initialize local roots prior to raising.
On 4.02, the OCaml unwinder otherwise gets confused and segfaults.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221142 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:44 +00:00
Peter Zotov
10fa04ca7d [OCaml] Core package should depend on LLVMTransformUtils for LLVMCloneModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221141 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:41 +00:00
Peter Zotov
40977ebc6a [OCaml] Fix ocamlc -custom builds when configured as --enable-shared.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221140 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:37 +00:00
Peter Zotov
cf0fe98b05 [OCaml] Avoid embedding absolute paths into executables.
Bindings built out-of-tree, e.g. via OPAM, should append
a line to META.llvm like the following:

linkopts = "-cclib -L$libdir -cclib -Wl,-rpath,$libdir"

where $libdir is the lib/ directory where LLVM libraries are
installed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221139 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:34 +00:00
Peter Zotov
29e82393ab [OCaml] Don't build stub libraries twice.
The default Makefile.rules BUILD_ARCHIVE machinery was
unintentionally enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221138 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:51:28 +00:00
Peter Zotov
7158970d0d [OCaml] META: remove exists_if(toplevel).
ocamlfind ignores the predicates in this case, making the package
unavailable for batch compilation as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221136 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:50:02 +00:00
Peter Zotov
3339b71768 [OCaml] ExecutionEngine package should not depend on interpreter.
Interpreter support was removed in r220957.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221135 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 09:49:42 +00:00
Peter Zotov
42187d2c00 [OCaml] Ensure consistent naming.
Specifically:
  * Directories match module names.
  * Test names match module names.
  * The language is called "OCaml", not "Ocaml".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220958 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-31 09:19:03 +00:00
Peter Zotov
ced3d172f8 [OCaml] Rework Llvm_executionengine using ctypes.
Since JIT->MCJIT migration, most of the ExecutionEngine interface
became deprecated and/or broken. This especially affected the OCaml
bindings, as runFunction is no longer available, and unlike in C,
it is not possible to coerce a pointer to a function and call it
in OCaml.

In practice, LLVM 3.5 shipped completely unusable
Llvm_executionengine.

The GenericValue interface and runFunction were essentially
a poor man's FFI. As such, this interface was removed and instead
a dependency on ctypes >=0.3 added, which handled platform-specific
aspects of accessing data and calling functions.

The new interface does not expose JIT (which is a shim around MCJIT),
as well as the interpreter (which can't handle a lot of valid IR).

Llvm_executionengine.add_global_mapping is currently unusable
due to PR20656.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220957 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-31 09:05:36 +00:00
Peter Zotov
b0d3f64971 [OCaml] Expose LLVMCloneModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220903 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30 08:30:12 +00:00
Peter Zotov
41796b40a9 [OCaml] Expose LLVM{Get,Set}DLLStorageClass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220902 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30 08:30:08 +00:00
Peter Zotov
47f88b5bdf [OCaml] [autoconf] Migrate to ocamlfind.
This commit updates the OCaml bindings and tests to use ocamlfind.
The bindings are migrated in order to use ctypes, which are now
required for MCJIT-backed Llvm_executionengine.
The tests are migrated in order to use OUnit and to verify that
the distributed META.llvm allows to build working executables.

Every OCaml toolchain invocation is now chained through ocamlfind,
which (in theory) allows to cross-compile the OCaml bindings.

The configure script now checks for ctypes (>= 0.2.3) and
OUnit (>= 2). The code depending on these libraries will be added
later. The configure script does not check the package versions
in order to keep changes less invasive.

Additionally, OCaml bindings will now be automatically enabled
if ocamlfind is detected on the system, rather than ocamlc, as it
was before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220899 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30 08:29:45 +00:00
Peter Zotov
b9f3251952 [OCaml] De-duplicate llvm_raise and llvm_string_of_message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220898 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30 08:29:29 +00:00
Peter Zotov
e0129b55d2 [OCaml] Expose Llvm.parse_command_line_options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220847 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-29 08:16:18 +00:00
Peter Zotov
57d796af1f [OCaml] Expose Llvm_target.TargetMachine.add_analysis_passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220846 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-29 08:16:14 +00:00
Peter Zotov
2e9579037d [OCaml] If compiled without --enable-shared, hide packages from toplevel.
Pretend they do not exist using exists_if. This is better than
the current situation, which is the error:

    Error: The external function `llvm_global_succ' is not available

but still somewhat confusing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220845 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-29 08:16:06 +00:00
Peter Zotov
a226572e59 [OCaml] Expose Llvm_bitwriter.write_bitcode_to_memory_buffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220844 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-29 08:16:01 +00:00