/*===-- llvm-c/Target.h - Target Lib C Iface --------------------*- C++ -*-===*/
/* */
/* Part of the LLVM Project, under the Apache License v2.0 with LLVM */
/* Exceptions. */
/* See https://llvm.org/LICENSE.txt for license information. */
/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */
/* */
/*===----------------------------------------------------------------------===*/
/* */
/* This header declares the C interface to libLLVMTarget.a, which */
/* implements target information. */
/* */
/* Many exotic languages can interoperate with C code but have a harder time */
/* with C++ due to name mangling. So in addition to C, this interface enables */
/* tools written in such languages. */
/* */
/*===----------------------------------------------------------------------===*/
/**
* @defgroup LLVMCTarget Target information
* @ingroup LLVMC
*
* @{
*/
;
typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef;
/* Declare all of the target-initialization functions that are available. */
/* Declare all of the available assembly printer initialization functions. */
/* Declare all of the available assembly parser initialization functions. */
/* Declare all of the available disassembler initialization functions. */
/** LLVMInitializeAllTargetInfos - The main program should call this function if
it wants access to all available targets that LLVM is configured to
support. */
static inline void
/** LLVMInitializeAllTargets - The main program should call this function if it
wants to link in all available targets that LLVM is configured to
support. */
static inline void
/** LLVMInitializeAllTargetMCs - The main program should call this function if
it wants access to all available target MC that LLVM is configured to
support. */
static inline void
/** LLVMInitializeAllAsmPrinters - The main program should call this function if
it wants all asm printers that LLVM is configured to support, to make them
available via the TargetRegistry. */
static inline void
/** LLVMInitializeAllAsmParsers - The main program should call this function if
it wants all asm parsers that LLVM is configured to support, to make them
available via the TargetRegistry. */
static inline void
/** LLVMInitializeAllDisassemblers - The main program should call this function
if it wants all disassemblers that LLVM is configured to support, to make
them available via the TargetRegistry. */
static inline void
/** LLVMInitializeNativeTarget - The main program should call this function to
initialize the native target corresponding to the host. This is useful
for JIT applications to ensure that the target gets linked in correctly. */
static inline LLVMBool
/** LLVMInitializeNativeTargetAsmParser - The main program should call this
function to initialize the parser for the native target corresponding to the
host. */
static inline LLVMBool
/** LLVMInitializeNativeTargetAsmPrinter - The main program should call this
function to initialize the printer for the native target corresponding to
the host. */
static inline LLVMBool
/** LLVMInitializeNativeTargetDisassembler - The main program should call this
function to initialize the disassembler for the native target corresponding
to the host. */
static inline LLVMBool
/*===-- Target Data -------------------------------------------------------===*/
/**
* Obtain the data layout for a module.
*
* @see Module::getDataLayout()
*/
LLVMTargetDataRef ;
/**
* Set the data layout for a module.
*
* @see Module::setDataLayout()
*/
void ;
/** Creates target data from a target layout string.
See the constructor llvm::DataLayout::DataLayout. */
LLVMTargetDataRef ;
/** Deallocates a TargetData.
See the destructor llvm::DataLayout::~DataLayout. */
void ;
/** Adds target library information to a pass manager. This does not take
ownership of the target library info.
See the method llvm::PassManagerBase::add. */
void ;
/** Converts target data to a target layout string. The string must be disposed
with LLVMDisposeMessage.
See the constructor llvm::DataLayout::DataLayout. */
char *;
/** Returns the byte order of a target, either LLVMBigEndian or
LLVMLittleEndian.
See the method llvm::DataLayout::isLittleEndian. */
enum LLVMByteOrdering ;
/** Returns the pointer size in bytes for a target.
See the method llvm::DataLayout::getPointerSize. */
unsigned ;
/** Returns the pointer size in bytes for a target for a specified
address space.
See the method llvm::DataLayout::getPointerSize. */
unsigned ;
/** Returns the integer type that is the same size as a pointer on a target.
See the method llvm::DataLayout::getIntPtrType. */
LLVMTypeRef ;
/** Returns the integer type that is the same size as a pointer on a target.
This version allows the address space to be specified.
See the method llvm::DataLayout::getIntPtrType. */
LLVMTypeRef ;
/** Returns the integer type that is the same size as a pointer on a target.
See the method llvm::DataLayout::getIntPtrType. */
LLVMTypeRef ;
/** Returns the integer type that is the same size as a pointer on a target.
This version allows the address space to be specified.
See the method llvm::DataLayout::getIntPtrType. */
LLVMTypeRef ;
/** Computes the size of a type in bytes for a target.
See the method llvm::DataLayout::getTypeSizeInBits. */
unsigned long long ;
/** Computes the storage size of a type in bytes for a target.
See the method llvm::DataLayout::getTypeStoreSize. */
unsigned long long ;
/** Computes the ABI size of a type in bytes for a target.
See the method llvm::DataLayout::getTypeAllocSize. */
unsigned long long ;
/** Computes the ABI alignment of a type in bytes for a target.
See the method llvm::DataLayout::getTypeABISize. */
unsigned ;
/** Computes the call frame alignment of a type in bytes for a target.
See the method llvm::DataLayout::getTypeABISize. */
unsigned ;
/** Computes the preferred alignment of a type in bytes for a target.
See the method llvm::DataLayout::getTypeABISize. */
unsigned ;
/** Computes the preferred alignment of a global variable in bytes for a target.
See the method llvm::DataLayout::getPreferredAlignment. */
unsigned ;
/** Computes the structure element that contains the byte offset for a target.
See the method llvm::StructLayout::getElementContainingOffset. */
unsigned ;
/** Computes the byte offset of the indexed struct element for a target.
See the method llvm::StructLayout::getElementContainingOffset. */
unsigned long long ;
/**
* @}
*/