Deleted Added
full compact
Target.h (226890) Target.h (235633)
1/*===-- llvm-c/Target.h - Target Lib C Iface --------------------*- C++ -*-===*/
2/* */
3/* The LLVM Compiler Infrastructure */
4/* */
5/* This file is distributed under the University of Illinois Open Source */
6/* License. See LICENSE.TXT for details. */
7/* */
8/*===----------------------------------------------------------------------===*/

--- 12 unchanged lines hidden (view full) ---

21
22#include "llvm-c/Core.h"
23#include "llvm/Config/llvm-config.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
1/*===-- llvm-c/Target.h - Target Lib C Iface --------------------*- C++ -*-===*/
2/* */
3/* The LLVM Compiler Infrastructure */
4/* */
5/* This file is distributed under the University of Illinois Open Source */
6/* License. See LICENSE.TXT for details. */
7/* */
8/*===----------------------------------------------------------------------===*/

--- 12 unchanged lines hidden (view full) ---

21
22#include "llvm-c/Core.h"
23#include "llvm/Config/llvm-config.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/**
30 * @defgroup LLVMCTarget Target information
31 * @ingroup LLVMC
32 *
33 * @{
34 */
35
29enum LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian };
30
31typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
32typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef;
33typedef struct LLVMStructLayout *LLVMStructLayoutRef;
34
35/* Declare all of the target-initialization functions that are available. */
36#define LLVM_TARGET(TargetName) \

--- 5 unchanged lines hidden (view full) ---

42#include "llvm/Config/Targets.def"
43#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
44
45#define LLVM_TARGET(TargetName) \
46 void LLVMInitialize##TargetName##TargetMC(void);
47#include "llvm/Config/Targets.def"
48#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
49
36enum LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian };
37
38typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
39typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef;
40typedef struct LLVMStructLayout *LLVMStructLayoutRef;
41
42/* Declare all of the target-initialization functions that are available. */
43#define LLVM_TARGET(TargetName) \

--- 5 unchanged lines hidden (view full) ---

49#include "llvm/Config/Targets.def"
50#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
51
52#define LLVM_TARGET(TargetName) \
53 void LLVMInitialize##TargetName##TargetMC(void);
54#include "llvm/Config/Targets.def"
55#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
56
57/* Declare all of the available assembly printer initialization functions. */
58#define LLVM_ASM_PRINTER(TargetName) \
59 void LLVMInitialize##TargetName##AsmPrinter();
60#include "llvm/Config/AsmPrinters.def"
61#undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */
62
63/* Declare all of the available assembly parser initialization functions. */
64#define LLVM_ASM_PARSER(TargetName) \
65 void LLVMInitialize##TargetName##AsmParser();
66#include "llvm/Config/AsmParsers.def"
67#undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */
68
69/* Declare all of the available disassembler initialization functions. */
70#define LLVM_DISASSEMBLER(TargetName) \
71 void LLVMInitialize##TargetName##Disassembler();
72#include "llvm/Config/Disassemblers.def"
73#undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */
74
50/** LLVMInitializeAllTargetInfos - The main program should call this function if
51 it wants access to all available targets that LLVM is configured to
52 support. */
53static inline void LLVMInitializeAllTargetInfos(void) {
54#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
55#include "llvm/Config/Targets.def"
56#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
57}
58
59/** LLVMInitializeAllTargets - The main program should call this function if it
60 wants to link in all available targets that LLVM is configured to
61 support. */
62static inline void LLVMInitializeAllTargets(void) {
63#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
64#include "llvm/Config/Targets.def"
65#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
66}
75/** LLVMInitializeAllTargetInfos - The main program should call this function if
76 it wants access to all available targets that LLVM is configured to
77 support. */
78static inline void LLVMInitializeAllTargetInfos(void) {
79#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
80#include "llvm/Config/Targets.def"
81#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
82}
83
84/** LLVMInitializeAllTargets - The main program should call this function if it
85 wants to link in all available targets that LLVM is configured to
86 support. */
87static inline void LLVMInitializeAllTargets(void) {
88#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
89#include "llvm/Config/Targets.def"
90#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
91}
92
93/** LLVMInitializeAllTargetMCs - The main program should call this function if
94 it wants access to all available target MC that LLVM is configured to
95 support. */
96static inline void LLVMInitializeAllTargetMCs(void) {
97#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC();
98#include "llvm/Config/Targets.def"
99#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
100}
67
101
102/** LLVMInitializeAllAsmPrinters - The main program should call this function if
103 it wants all asm printers that LLVM is configured to support, to make them
104 available via the TargetRegistry. */
105static inline void LLVMInitializeAllAsmPrinters() {
106#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
107#include "llvm/Config/AsmPrinters.def"
108#undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */
109}
110
111/** LLVMInitializeAllAsmParsers - The main program should call this function if
112 it wants all asm parsers that LLVM is configured to support, to make them
113 available via the TargetRegistry. */
114static inline void LLVMInitializeAllAsmParsers() {
115#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
116#include "llvm/Config/AsmParsers.def"
117#undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */
118}
119
120/** LLVMInitializeAllDisassemblers - The main program should call this function
121 if it wants all disassemblers that LLVM is configured to support, to make
122 them available via the TargetRegistry. */
123static inline void LLVMInitializeAllDisassemblers() {
124#define LLVM_DISASSEMBLER(TargetName) \
125 LLVMInitialize##TargetName##Disassembler();
126#include "llvm/Config/Disassemblers.def"
127#undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */
128}
129
68/** LLVMInitializeNativeTarget - The main program should call this function to
69 initialize the native target corresponding to the host. This is useful
70 for JIT applications to ensure that the target gets linked in correctly. */
71static inline LLVMBool LLVMInitializeNativeTarget(void) {
72 /* If we have a native target, initialize it to ensure it is linked in. */
73#ifdef LLVM_NATIVE_TARGET
74 LLVM_NATIVE_TARGETINFO();
75 LLVM_NATIVE_TARGET();

--- 76 unchanged lines hidden (view full) ---

152 See the method llvm::StructLayout::getElementContainingOffset. */
153unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef, LLVMTypeRef StructTy,
154 unsigned Element);
155
156/** Deallocates a TargetData.
157 See the destructor llvm::TargetData::~TargetData. */
158void LLVMDisposeTargetData(LLVMTargetDataRef);
159
130/** LLVMInitializeNativeTarget - The main program should call this function to
131 initialize the native target corresponding to the host. This is useful
132 for JIT applications to ensure that the target gets linked in correctly. */
133static inline LLVMBool LLVMInitializeNativeTarget(void) {
134 /* If we have a native target, initialize it to ensure it is linked in. */
135#ifdef LLVM_NATIVE_TARGET
136 LLVM_NATIVE_TARGETINFO();
137 LLVM_NATIVE_TARGET();

--- 76 unchanged lines hidden (view full) ---

214 See the method llvm::StructLayout::getElementContainingOffset. */
215unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef, LLVMTypeRef StructTy,
216 unsigned Element);
217
218/** Deallocates a TargetData.
219 See the destructor llvm::TargetData::~TargetData. */
220void LLVMDisposeTargetData(LLVMTargetDataRef);
221
222/**
223 * @}
224 */
160
161#ifdef __cplusplus
162}
163
164namespace llvm {
165 class TargetData;
166 class TargetLibraryInfo;
167

--- 21 unchanged lines hidden ---
225
226#ifdef __cplusplus
227}
228
229namespace llvm {
230 class TargetData;
231 class TargetLibraryInfo;
232

--- 21 unchanged lines hidden ---