19#ifndef LLVM_C_TARGET_H
20#define LLVM_C_TARGET_H
26#include "llvm/Config/llvm-config.h"
43#define LLVM_TARGET(TargetName) \
44 LLVM_C_ABI void LLVMInitialize##TargetName##TargetInfo(void);
45#include "llvm/Config/Targets.def"
48#define LLVM_TARGET(TargetName) \
49 LLVM_C_ABI void LLVMInitialize##TargetName##Target(void);
50#include "llvm/Config/Targets.def"
53#define LLVM_TARGET(TargetName) \
54 LLVM_C_ABI void LLVMInitialize##TargetName##TargetMC(void);
55#include "llvm/Config/Targets.def"
59#define LLVM_ASM_PRINTER(TargetName) \
60 LLVM_C_ABI void LLVMInitialize##TargetName##AsmPrinter(void);
61#include "llvm/Config/AsmPrinters.def"
62#undef LLVM_ASM_PRINTER
65#define LLVM_ASM_PARSER(TargetName) \
66 LLVM_C_ABI void LLVMInitialize##TargetName##AsmParser(void);
67#include "llvm/Config/AsmParsers.def"
71#define LLVM_DISASSEMBLER(TargetName) \
72 LLVM_C_ABI void LLVMInitialize##TargetName##Disassembler(void);
73#include "llvm/Config/Disassemblers.def"
74#undef LLVM_DISASSEMBLER
80#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
81#include "llvm/Config/Targets.def"
89#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
90#include "llvm/Config/Targets.def"
98#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC();
99#include "llvm/Config/Targets.def"
107#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
108#include "llvm/Config/AsmPrinters.def"
109#undef LLVM_ASM_PRINTER
116#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
117#include "llvm/Config/AsmParsers.def"
118#undef LLVM_ASM_PARSER
125#define LLVM_DISASSEMBLER(TargetName) \
126 LLVMInitialize##TargetName##Disassembler();
127#include "llvm/Config/Disassemblers.def"
128#undef LLVM_DISASSEMBLER
136#ifdef LLVM_NATIVE_TARGET
137 LLVM_NATIVE_TARGETINFO();
138 LLVM_NATIVE_TARGET();
139 LLVM_NATIVE_TARGETMC();
150#ifdef LLVM_NATIVE_ASMPARSER
151 LLVM_NATIVE_ASMPARSER();
162#ifdef LLVM_NATIVE_ASMPRINTER
163 LLVM_NATIVE_ASMPRINTER();
174#ifdef LLVM_NATIVE_DISASSEMBLER
175 LLVM_NATIVE_DISASSEMBLER();
235 "Use of the global context is deprecated, use "
236 "LLVMIntPtrTypeInContext instead");
243 "Use of the global context is deprecated, use LLVMIntPtrTypeForASInContext "
297 unsigned long long Offset);
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
#define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message)
#define LLVM_C_EXTERN_C_BEGIN
#define LLVM_C_EXTERN_C_END
LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD)
LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS)
#define LLVM_C_ABI
LLVM_C_ABI is the export/visibility macro used to mark symbols declared in llvm-c as exported when bu...
struct LLVMOpaqueValue * LLVMValueRef
Represents an individual value in LLVM IR.
struct LLVMOpaquePassManager * LLVMPassManagerRef
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
struct LLVMOpaqueType * LLVMTypeRef
Each value in the LLVM IR has a type, an LLVMTypeRef.
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
static LLVMBool LLVMInitializeNativeAsmParser(void)
LLVMInitializeNativeTargetAsmParser - The main program should call this function to initialize the pa...
LLVM_C_ABI LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M)
Obtain the data layout for a module.
LLVM_C_ABI LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep)
Creates target data from a target layout string.
LLVM_C_ABI unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the preferred alignment of a type in bytes for a target.
LLVM_C_ABI unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the call frame alignment of a type in bytes for a target.
LLVM_C_ABI unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned Element)
Computes the byte offset of the indexed struct element for a target.
LLVM_C_ABI void LLVMDisposeTargetData(LLVMTargetDataRef TD)
Deallocates a TargetData.
LLVM_C_ABI void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI, LLVMPassManagerRef PM)
Adds target library information to a pass manager.
LLVM_C_ABI enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD)
Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian.
LLVM_C_ABI unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, LLVMValueRef GlobalVar)
Computes the preferred alignment of a global variable in bytes for a target.
LLVM_C_ABI unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the storage size of a type in bytes for a target.
static void LLVMInitializeAllTargetInfos(void)
LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all a...
LLVM_C_ABI unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the ABI size of a type in bytes for a target.
LLVM_C_ABI unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS)
Returns the pointer size in bytes for a target for a specified address space.
LLVM_C_ABI unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the ABI alignment of a type in bytes for a target.
LLVM_C_ABI unsigned LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset)
Computes the structure element that contains the byte offset for a target.
LLVM_C_ABI LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD)
Returns the integer type that is the same size as a pointer on a target.
static LLVMBool LLVMInitializeNativeAsmPrinter(void)
LLVMInitializeNativeTargetAsmPrinter - The main program should call this function to initialize the p...
static LLVMBool LLVMInitializeNativeDisassembler(void)
LLVMInitializeNativeTargetDisassembler - The main program should call this function to initialize the...
static void LLVMInitializeAllTargetMCs(void)
LLVMInitializeAllTargetMCs - The main program should call this function if it wants access to all ava...
LLVM_C_ABI char * LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD)
Converts target data to a target layout string.
LLVM_C_ABI unsigned LLVMPointerSize(LLVMTargetDataRef TD)
Returns the pointer size in bytes for a target.
LLVM_C_ABI LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS)
Returns the integer type that is the same size as a pointer on a target.
struct LLVMOpaqueTargetLibraryInfotData * LLVMTargetLibraryInfoRef
static void LLVMInitializeAllAsmParsers(void)
LLVMInitializeAllAsmParsers - The main program should call this function if it wants all asm parsers ...
LLVM_C_ABI void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL)
Set the data layout for a module.
static LLVMBool LLVMInitializeNativeTarget(void)
LLVMInitializeNativeTarget - The main program should call this function to initialize the native targ...
LLVM_C_ABI unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the size of a type in bits for a target.
static void LLVMInitializeAllTargets(void)
LLVMInitializeAllTargets - The main program should call this function if it wants to link in all avai...
struct LLVMOpaqueTargetData * LLVMTargetDataRef
static void LLVMInitializeAllAsmPrinters(void)
LLVMInitializeAllAsmPrinters - The main program should call this function if it wants all asm printer...
static void LLVMInitializeAllDisassemblers(void)
LLVMInitializeAllDisassemblers - The main program should call this function if it wants all disassemb...