1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

44 Commits

Author SHA1 Message Date
Amaury Sechet
c76ae6d2c7 Move LLVMCreateTargetData and LLVMDisposeTargetData together. NFC
llvm-svn: 261172
2016-02-17 22:41:09 +00:00
Amaury Sechet
34464e942c Restore the capability to manipulate datalayout from the C API
Summary:
This consist in variosu addition to the C API:

  LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M);
  void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL);
  LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T);

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: axw

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

llvm-svn: 260936
2016-02-16 05:11:24 +00:00
Amaury Sechet
c4e8893256 Kill LLVMAddTargetData
Summary: It's red, it's dead.

Reviewers: joker.eph, Wallbraker, echristo

Subscribers: llvm-commits, axw

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

llvm-svn: 260919
2016-02-16 00:22:02 +00:00
Eric Christopher
359dea2a6b Reorganize the C API headers to improve build times.
Type specific declarations have been moved to Type.h and error handling
routines have been moved to ErrorHandling.h. Both are included in Core.h
so nothing should change for projects directly including the headers,
but transitive dependencies may be affected.

llvm-svn: 255965
2015-12-18 01:46:52 +00:00
Peter Zotov
91167f1db8 [llvm-c] Remove dead typedef
llvm-svn: 194379
2013-11-11 14:47:01 +00:00
Peter Zotov
a6f1bcb963 [llvm-c] Add parameter names in Target.h for C99 compliance
llvm-svn: 194146
2013-11-06 11:52:40 +00:00
Peter Zotov
7fd5406379 [llvm-c] Correctly check for existence of native AsmParser, AsmPrinter, Disassembler
Also, properly name the functions.

llvm-svn: 194141
2013-11-06 09:45:53 +00:00
Peter Zotov
6215c17f09 [llvm-c] Add functions for initializing native AsmPrinter, AsmParser & Disassembler
Original patch by Chris Wailes

llvm-svn: 194140
2013-11-06 09:21:35 +00:00
NAKAMURA Takumi
e00f2f7862 llvm-c/Target.h: Tweak "inline" for msvc to use __inline instead.
FIXME: I don't think it'd be smart.
llvm-svn: 193256
2013-10-23 17:56:52 +00:00
NAKAMURA Takumi
c7a887ac16 include/llvm-c: Whitespace.
llvm-svn: 193253
2013-10-23 17:56:29 +00:00
Anders Waldenborg
35a2684cc0 llvm-c: Add LLVMIntPtrType{,ForAS}InContext
All of the Core API functions have versions which accept explicit context, in
addition to ones which work on global context. This commit adds functions
which accept explicit context to the Target API for consistency.

Patch by Peter Zotov

Differential Revision: http://llvm-reviews.chandlerc.com/D1912

llvm-svn: 192913
2013-10-17 18:51:01 +00:00
Anders Waldenborg
34543fbd59 Revert "Add AllTargetsBindings sublibrary" as it breaks cmake build on (atleast) windows and darwin.
llvm-svn: 192697
2013-10-15 13:04:27 +00:00
Anders Waldenborg
d5563422cd Add AllTargetsBindings sublibrary instead of having static inlines in the llvm-c headers.
This new library will be linked in when using the "all-targets"
component and contains the LLVMInitializeAll* functions.

This means that those functions will exist as real symbols in
the shared library, and can therefore can be called from
bindings that are using ffi the shared library.

llvm-svn: 192690
2013-10-15 12:08:59 +00:00
Rui Ueyama
3d4e6c8475 Revert "llvm-c: Make target initializer functions external functions in lib."
This reverts commit r192316. The original change introduced circular
dependencies between libTarget and backends. That would broke a build unless
link everything into one big binary.

llvm-svn: 192329
2013-10-09 23:15:49 +00:00
Anders Waldenborg
d556328a9c llvm-c: Make target initializer functions external functions in lib.
Making them proper functions defined in the (shared)lib instead of
static inlines defined in the header files makes it possible to
actually distribute a binary compiled against the shared library
without having to worry about getting undefined symbol errors when
calling e.g LLVMInitializeAllTargetInfos because the shared library on
the other system was compiled with different targets.

Differential Revision: http://llvm-reviews.chandlerc.com/D1714

llvm-svn: 192316
2013-10-09 19:02:09 +00:00
Eric Christopher
beec5d09da Move C++ code out of the C headers and into either C++ headers
or the C++ files themselves. This enables people to use
just a C compiler to interoperate with LLVM.

llvm-svn: 180063
2013-04-22 22:47:22 +00:00
Evan Cheng
dd1796b8b4 Revert r178713
llvm-svn: 178769
2013-04-04 17:40:53 +00:00
Evan Cheng
9170d95869 Make it possible to include llvm-c without including C++ headers. Patch by Filip Pizlo.
llvm-svn: 178713
2013-04-03 23:12:39 +00:00
Micah Villmow
272663afc2 Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis.
llvm-svn: 165941
2012-10-15 16:24:29 +00:00
Micah Villmow
4eb108750d Revert 165732 for further review.
llvm-svn: 165747
2012-10-11 21:27:41 +00:00
Micah Villmow
d8b76fdc50 Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly.
llvm-svn: 165726
2012-10-11 17:21:41 +00:00
Micah Villmow
bb1a25cd67 Move TargetData to DataLayout.
llvm-svn: 165402
2012-10-08 16:38:25 +00:00
Anders Waldenborg
35029911b7 [llvm-c] Make a few function declarations proper prototypes
This avoids warnings when included in a application that
uses -Wstrict-prototypes. 

e.g: AsmPrinters.def:27:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]

llvm-svn: 155997
2012-05-02 16:15:32 +00:00
Bill Wendling
23830b53f3 Add 'undef's to make SWIG happier. Patch by Baozeng Ding.
llvm-svn: 153479
2012-03-26 22:15:12 +00:00
Gregory Szorc
43c1c2e000 Organize LLVM C API docs into doxygen modules; add docs
This gives a lot of love to the docs for the C API. Like Clang's
documentation, the C API is now organized into a Doxygen "module"
(LLVMC). Each C header file is a child of the main module. Some modules
(like Core) have a hierarchy of there own. The produced documentation is
thus better organized (before everything was in one monolithic list).

This patch also includes a lot of new documentation for APIs in Core.h.
It doesn't document them all, but is better than none. Function docs are
missing @param and @return annotation, but the documentation body now
commonly provides help details (like the expected llvm::Value sub-type
to expect).

llvm-svn: 153157
2012-03-21 03:54:29 +00:00
Daniel Dunbar
7e05a207c4 llvm-c: Add a few missing InitializeAll* functions.
llvm-svn: 145330
2011-11-29 00:06:55 +00:00
Rafael Espindola
7c7d45a67c Add LLVMAddTargetLibraryInfo to the C API.
llvm-svn: 135975
2011-07-25 21:20:54 +00:00
Evan Cheng
7b4cb12a95 Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.

llvm-svn: 135812
2011-07-22 21:58:54 +00:00
Evan Cheng
bfc0cac54d Introduce MCCodeGenInfo, which keeps information that can affect codegen
(including compilation, assembly). Move relocation model Reloc::Model from
TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine.

llvm-svn: 135468
2011-07-19 06:37:02 +00:00
Chris Lattner
aba8e40670 remove the InvalidateStructLayoutInfo API, which is dead and unnecessary now
that type refinement is toast.

llvm-svn: 135245
2011-07-15 05:21:59 +00:00
Evan Cheng
9e8f90a020 Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
llvm-svn: 135219
2011-07-14 23:50:31 +00:00
Eric Christopher
da5541e56d Fix LLVM target initialization to deal with sociopathic outside projects
that like to randomly define things like "X86", regenerate autoconf bits
and update cmake.

Fixes PR7852.

Patch by Xerxes Rånby!

llvm-svn: 112499
2010-08-30 18:34:48 +00:00
Eric Christopher
33fd5d63b3 Fix PR7809 by creating a header for just llvm variables that can be
included in exported interfaces.  Update a couple of exported interfaces.

llvm-svn: 110532
2010-08-08 02:44:17 +00:00
Eric Christopher
22f09fc078 80 columns.
llvm-svn: 108126
2010-07-12 05:13:35 +00:00
Chris Lattner
105e312fb4 add some more (void)'s to prototypes for PR6961
llvm-svn: 102667
2010-04-29 23:27:32 +00:00
Chris Lattner
e9c0d1574a declare targets with (void) instead of () since this is a C header.
Patch by Lars R in PR6961.

llvm-svn: 102523
2010-04-28 20:24:45 +00:00
Chris Lattner
3f06b3d517 hopefully unbreak the ocaml bindings.
llvm-svn: 93082
2010-01-09 23:25:21 +00:00
Chris Lattner
953394de82 "In order to ease automatic bindings generation, it would be helpful if boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."
Patch by James Y Knight!

llvm-svn: 93079
2010-01-09 22:27:07 +00:00
Chris Lattner
604ec33b09 improve compatibility with SWIG, patch by James Knight!
llvm-svn: 91822
2009-12-21 07:52:40 +00:00
Daniel Dunbar
4e5ca5c595 Add LLVMInitializeAllTargetInfos for C api, and update
LLVMInitializeNativeTarget to initialize target info.
 - Patch by Jose Fonseca.

llvm-svn: 79307
2009-08-18 03:03:27 +00:00
Bob Wilson
7bd642b80c Provide InitializeAllTargets and InitializeNativeTarget functions in the
C bindings.  Change all the backend "Initialize" functions to have C linkage.
Change the "llvm/Config/Targets.def" header to use C-style comments to avoid
compile warnings.

llvm-svn: 74026
2009-06-23 23:59:40 +00:00
Duncan Sands
f7af13b2d4 Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.

llvm-svn: 71349
2009-05-09 07:06:46 +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
04a60ddcd2 C and Objective Caml bindings for the TargetData class.
llvm-svn: 48422
2008-03-16 20:08:03 +00:00