Chris Lattner
d3018e6a0e
Use simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.
...
llvm-svn: 49976
2008-04-20 00:26:06 +00:00
Duncan Sands
a07136ee2d
Merge LLVMBuilder and FoldingBuilder, calling
...
the result IRBuilder. Patch by Dominic Hamon.
llvm-svn: 49604
2008-04-13 06:22:09 +00:00
Gabor Greif
e9ecc68d8f
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Chris Lattner
6f2ffdb73f
Change the MemoryBuffer::getFile* methods to take just a pointer to the
...
start of a filename, not a filename+length. All clients can produce a
null terminated name, and the system api's require null terminated
strings anyway.
llvm-svn: 49041
2008-04-01 18:04:03 +00:00
Gordon Henriksen
07a45f4edb
Objective Caml bindings for basic block, function, global, and arg iterators.
...
llvm-svn: 48711
2008-03-23 22:21:29 +00:00
Gordon Henriksen
054817ce06
C bindings for Module-, Function-, and BasicBlock::iterator.
...
llvm-svn: 48528
2008-03-19 03:47:18 +00:00
Gordon Henriksen
265f780c22
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
6c6075e326
Expose Module::dump via C and Ocaml.
...
Patch by Erick Tryzelaar.
llvm-svn: 48379
2008-03-14 23:58:56 +00:00
Anton Korobeynikov
579f07135a
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
...
llvm-svn: 47367
2008-02-20 11:08:44 +00:00
Gordon Henriksen
931e121ad1
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
097102c32a
Adding C bindings for SwitchInst::addCase.
...
Patch by Bryan O'Sullivan!
llvm-svn: 45481
2008-01-01 05:50:53 +00:00
Gordon Henriksen
4a4d73519e
Add some doxygen comments to llvm-c/Core.h.
...
llvm-svn: 45450
2007-12-30 17:46:33 +00:00
Chris Lattner
f3ebc3f3d2
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Gordon Henriksen
05568bbd98
Adding bindings for target triple and data layout.
...
llvm-svn: 45369
2007-12-27 20:13:47 +00:00
Gordon Henriksen
823f9730d7
Switch the bindings to use LLVMFoldingBuilder.
...
llvm-svn: 45367
2007-12-27 18:25:59 +00:00
Gordon Henriksen
34eb6d877e
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
5a3fe03784
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
Christopher Lamb
edf0788758
Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
...
llvm-svn: 45082
2007-12-17 01:12:55 +00:00
Gordon Henriksen
0a68fe2ffc
Add (very basic) bindings for ModuleProvider.
...
llvm-svn: 44899
2007-12-12 01:04:30 +00:00
Gordon Henriksen
71183b6739
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
44dd8fbd26
C and Objective Caml bindings for PHINode::addIncoming etc.
...
llvm-svn: 42760
2007-10-08 18:14:39 +00:00
Evan Cheng
acc8b68e5f
Remove debugging printf to get build going on x86-64.
...
llvm-svn: 42757
2007-10-08 17:49:43 +00:00
Gordon Henriksen
783f7bbabd
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
751ebf7b9a
C and Objective Caml bindings for GlobalVariable::isConstant.
...
llvm-svn: 42736
2007-10-07 17:31:42 +00:00
Gordon Henriksen
ffb4876cfb
C and Objective Caml bindings for PATypeHolder.
...
llvm-svn: 42713
2007-10-07 00:13:35 +00:00
Gordon Henriksen
ed7beaa3fa
Adopting a uniform naming convention for type constructors in bindings.
...
llvm-svn: 42698
2007-10-06 16:05:20 +00:00
Gordon Henriksen
1046c73d12
Adopting a uniform naming convention for constant constructors in bindings.
...
llvm-svn: 42697
2007-10-06 15:11:06 +00:00
Gordon Henriksen
7ce3176696
Adding C and Ocaml bindings for ConstantExpr.
...
llvm-svn: 42696
2007-10-06 14:29:36 +00:00
Gordon Henriksen
1d0d24c4fd
Wrapping Value::dump.
...
llvm-svn: 42668
2007-10-06 00:08:49 +00:00
Gordon Henriksen
7330acdec7
Removing the silly CHelpers header by rolling wrap and unwrap into the C
...
bindings headers themselves, hidden behind #ifdef __cplusplus.
llvm-svn: 42666
2007-10-05 23:59:36 +00:00
Gordon Henriksen
6547e5a2bc
Demoting CHelpers.h to include/llvm/Support.
...
llvm-svn: 42465
2007-09-29 01:38:42 +00:00
Gordon Henriksen
c23b66c58b
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
dc88c06732
Tests of the ocaml (and thus C) bindings for constants.
...
llvm-svn: 42101
2007-09-18 18:07:51 +00:00
Gordon Henriksen
76a0374b25
C bindings for libLLVMCore.a and libLLVMBitWriter.a.
...
- The naming prefix is LLVM.
- All types are represented using opaque references.
- Functions are not named LLVM{Type}{Method}; the names became
unreadable goop. Instead, they are named LLVM{ImperativeSentence}.
- Where an attribute only appears once in the class hierarchy (e.g.,
linkage only applies to values; parameter types only apply to
function types), the class is omitted from identifiers for
brevity. Tastes like methods.
- Strings are C strings or string/length tuples on a case-by-case
basis.
- APIs which give the caller ownership of an object are not mapped
(removeFromParent, certain constructor overloads). This keeps
keep memory management as simple as possible.
For each library with bindings:
llvm-c/<LIB>.h - Declares the bindings.
lib/<LIB>/<LIB>.cpp - Implements the bindings.
So just link with the library of your choice and use the C header
instead of the C++ one.
llvm-svn: 42077
2007-09-18 03:18:57 +00:00