Duncan Sands
aadb34c357
Remove the one-definition-rule version of extern_weak
...
linkage: this linkage type only applies to declarations,
but ODR is only relevant to globals with definitions.
llvm-svn: 66650
2009-03-11 08:08:06 +00:00
Duncan Sands
5ab54d488f
Introduce new linkage types linkonce_odr, weak_odr, common_odr
...
and extern_weak_odr. These are the same as the non-odr versions,
except that they indicate that the global will only be overridden
by an *equivalent* global. In C, a function with weak linkage can
be overridden by a function which behaves completely differently.
This means that IP passes have to skip weak functions, since any
deductions made from the function definition might be wrong, since
the definition could be replaced by something completely different
at link time. This is not allowed in C++, thanks to the ODR
(One-Definition-Rule): if a function is replaced by another at
link-time, then the new function must be the same as the original
function. If a language knows that a function or other global can
only be overridden by an equivalent global, it can give it the
weak_odr linkage type, and the optimizers will understand that it
is alright to make deductions based on the function body. The
code generators on the other hand map weak and weak_odr linkage
to the same thing.
llvm-svn: 66339
2009-03-07 15:45:40 +00:00
Chris Lattner
7992ce5137
fix header comment and include guard.
...
llvm-svn: 66273
2009-03-06 16:54:19 +00:00
Chris Lattner
c5dba8954e
add a bunch more passes to the C bindings (PR3734), patch by
...
Lennart Augustsson!
llvm-svn: 66272
2009-03-06 16:52:18 +00:00
Nick Lewycky
c54f8330b0
Correct strange whitespace.
...
llvm-svn: 63927
2009-02-06 07:01:00 +00:00
Chris Lattner
b4ffb1f824
add getPointerToGlobal to the C bindings, patch by Lennart Augustsson!
...
PR3364
llvm-svn: 62697
2009-01-21 18:11:10 +00:00
Duncan Sands
bcdbfb63dc
Rename getABITypeSize to getTypePaddedSize, as
...
suggested by Chris.
llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Gordon Henriksen
9b8b72fe0a
Add dyn_cast_or_null bindings for some additional classes missed in r61252.
...
llvm-svn: 61253
2008-12-19 18:51:17 +00:00
Gordon Henriksen
1f4a555efc
C bindings for dyn_cast_or_null.
...
This operation can be used to build dyn_cast, isa, and cast.
llvm-svn: 61252
2008-12-19 18:39:45 +00:00
Chris Lattner
a2aa680882
This adds some missing functions to the C binding:
...
- ability to insert previously created instructions using a builder
- creation of aliases
- creation of inline asm constants
Patch by Zoltan Varga!
llvm-svn: 61153
2008-12-17 21:39:50 +00:00
Nick Lewycky
39e055d2a3
Add protected visibility to libLTO.
...
llvm-svn: 60257
2008-11-29 22:49:59 +00:00
Dan Gohman
3258c45d0f
Add C bindings for extractvalue and insertvalue. Patch by Frits van Bommel!
...
llvm-svn: 58650
2008-11-03 22:55:43 +00:00
Devang Patel
64dd7a2e89
Large mechanical patch.
...
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622
2008-09-25 21:00:45 +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
b0ee2172b0
Fix the LLVMCreateJITCompiler C binding.
...
Evan broke it in r54523 by adding a parameter in the implementation without
updating the header correspondingly.
llvm-svn: 54555
2008-08-08 20:49:28 +00:00
Eric Christopher
dcd4752642
Have IRBuilder take a template argument on whether or not to preserve
...
names. This can save a lot of allocations if you aren't going to be
looking at the output.
llvm-svn: 54546
2008-08-08 19:39:37 +00:00
Devang Patel
af72f3b02e
Provide a hook to set the code generation debug options to investigate lto failures.
...
llvm-svn: 53119
2008-07-03 22:53:14 +00:00
Gordon Henriksen
50ca4ebe97
Add C binding for ExecutionEngine::addGlobalMapping.
...
llvm-svn: 52523
2008-06-20 02:16:11 +00:00
Gordon Henriksen
a1f7004038
Remove a duplicative binding. Patch by Mahadevan R.
...
llvm-svn: 51238
2008-05-19 05:47:10 +00:00
Gordon Henriksen
464bfd405a
Improve documentation.
...
llvm-svn: 50768
2008-05-06 19:17:01 +00:00
Gordon Henriksen
6f33fd36ab
Use (void) instead of () in C code.
...
llvm-svn: 50620
2008-05-04 12:55:34 +00:00
Anton Korobeynikov
a2edd9607f
Correct parameter attributes encoding for C bindings.
...
Patch by Anders Johnsen!
llvm-svn: 50375
2008-04-28 21:48:04 +00:00
Gordon Henriksen
0b2f0d3007
Expose parameter attributes via C bindings.
...
Patch by Anders Johnsen!
llvm-svn: 50360
2008-04-28 17:37:06 +00:00
Gordon Henriksen
cd80583c68
PR2245: Misleading parameter name in llvm-c/Core.h:LLVMConstArray
...
Applying fix by Frits van Bommel.
llvm-svn: 50250
2008-04-25 03:21:19 +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
Erick Tryzelaar
847ee3e279
Expose Function::viewCFG and Function::viewCFGOnly to bindings.
...
llvm-svn: 48982
2008-03-31 16:22:09 +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
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
dca0a5c5dc
C and Objective Caml bindings for mem2reg and reg2mem.
...
Patch by Erick Tryzelaar.
llvm-svn: 48602
2008-03-20 17:16:03 +00:00
Gordon Henriksen
e4b3339de8
C bindings for Module-, Function-, and BasicBlock::iterator.
...
llvm-svn: 48528
2008-03-19 03:47:18 +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
b7259e6e65
Remove unnecessary includes.
...
llvm-svn: 48418
2008-03-16 15:55:43 +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
5da39fa644
Cleanup some comments in the OCaml bindings.
...
Patch by Erick Tryzelaar.
llvm-svn: 48014
2008-03-07 19:13:06 +00:00
Nick Kledzik
f32192eb76
fixes from review of first commit
...
llvm-svn: 47695
2008-02-27 22:25:36 +00:00
Nick Kledzik
7ebb5aa81a
first commit of new LTO system. It is not hooked up in the llvm/tools/Makefile, so no one will build it be default yet
...
llvm-svn: 47621
2008-02-26 20:26:43 +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
d2485b2cec
Adding C bindings for SwitchInst::addCase.
...
Patch by Bryan O'Sullivan!
llvm-svn: 45481
2008-01-01 05:50:53 +00:00
Gordon Henriksen
8082358f86
Add some doxygen comments to llvm-c/Core.h.
...
llvm-svn: 45450
2007-12-30 17:46:33 +00:00
Gordon Henriksen
36da9ea958
Bindings for instruction calling conventions.
...
llvm-svn: 45422
2007-12-29 20:45:00 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +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
d96b3222e5
Switch the bindings to use LLVMFoldingBuilder.
...
llvm-svn: 45367
2007-12-27 18:25:59 +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
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