mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-30 04:56:49 +00:00
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153157 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9be7c94ccd
commit
6244b51888
@ -25,6 +25,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCAnalysis Analysis
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LLVMAbortProcessAction, /* verifier will print to stderr and abort() */
|
LLVMAbortProcessAction, /* verifier will print to stderr and abort() */
|
||||||
@ -48,6 +54,10 @@ LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action);
|
|||||||
void LLVMViewFunctionCFG(LLVMValueRef Fn);
|
void LLVMViewFunctionCFG(LLVMValueRef Fn);
|
||||||
void LLVMViewFunctionCFGOnly(LLVMValueRef Fn);
|
void LLVMViewFunctionCFGOnly(LLVMValueRef Fn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,6 +25,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCBitReader Bit Reader
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/* Builds a module from the bitcode in the specified memory buffer, returning a
|
/* Builds a module from the bitcode in the specified memory buffer, returning a
|
||||||
reference to the module via the OutModule parameter. Returns 0 on success.
|
reference to the module via the OutModule parameter. Returns 0 on success.
|
||||||
@ -59,6 +65,10 @@ LLVMBool LLVMGetBitcodeModuleProvider(LLVMMemoryBufferRef MemBuf,
|
|||||||
LLVMModuleProviderRef *OutMP,
|
LLVMModuleProviderRef *OutMP,
|
||||||
char **OutMessage);
|
char **OutMessage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,6 +25,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCBitWriter Bit Writer
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/*===-- Operations on modules ---------------------------------------------===*/
|
/*===-- Operations on modules ---------------------------------------------===*/
|
||||||
|
|
||||||
@ -39,6 +45,10 @@ int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose,
|
|||||||
descriptor. Returns 0 on success. Closes the Handle. */
|
descriptor. Returns 0 on success. Closes the Handle. */
|
||||||
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle);
|
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,13 @@
|
|||||||
#include "llvm/Support/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCDisassembler Disassembler
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An opaque reference to a disassembler context.
|
* An opaque reference to a disassembler context.
|
||||||
*/
|
*/
|
||||||
@ -157,6 +164,10 @@ size_t LLVMDisasmInstruction(LLVMDisasmContextRef DC, uint8_t *Bytes,
|
|||||||
uint64_t BytesSize, uint64_t PC,
|
uint64_t BytesSize, uint64_t PC,
|
||||||
char *OutString, size_t OutStringSize);
|
char *OutString, size_t OutStringSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* !defined(__cplusplus) */
|
#endif /* !defined(__cplusplus) */
|
||||||
|
@ -25,6 +25,19 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCEnhancedDisassembly Enhanced Disassembly
|
||||||
|
* @ingroup LLVMC
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* This module contains an interface to the Enhanced Disassembly (edis)
|
||||||
|
* library. The edis library is deprecated and will likely disappear in
|
||||||
|
* the near future. You should use the @ref LLVMCDisassembler interface
|
||||||
|
* instead.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@typedef EDByteReaderCallback
|
@typedef EDByteReaderCallback
|
||||||
Interface to memory from which instructions may be read.
|
Interface to memory from which instructions may be read.
|
||||||
@ -504,6 +517,10 @@ int EDBlockEvaluateOperand(uint64_t *result,
|
|||||||
int EDBlockVisitTokens(EDInstRef inst,
|
int EDBlockVisitTokens(EDInstRef inst,
|
||||||
EDTokenVisitor_t visitor);
|
EDTokenVisitor_t visitor);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -26,6 +26,13 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCExecutionEngine Execution Engine
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
void LLVMLinkInJIT(void);
|
void LLVMLinkInJIT(void);
|
||||||
void LLVMLinkInInterpreter(void);
|
void LLVMLinkInInterpreter(void);
|
||||||
|
|
||||||
@ -125,6 +132,10 @@ void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global,
|
|||||||
|
|
||||||
void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global);
|
void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,15 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCInitialization Initialization Routines
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* This module contains routines used to initialize the LLVM system.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
void LLVMInitializeCore(LLVMPassRegistryRef R);
|
void LLVMInitializeCore(LLVMPassRegistryRef R);
|
||||||
void LLVMInitializeTransformUtils(LLVMPassRegistryRef R);
|
void LLVMInitializeTransformUtils(LLVMPassRegistryRef R);
|
||||||
void LLVMInitializeScalarOpts(LLVMPassRegistryRef R);
|
void LLVMInitializeScalarOpts(LLVMPassRegistryRef R);
|
||||||
@ -34,6 +43,10 @@ void LLVMInitializeIPA(LLVMPassRegistryRef R);
|
|||||||
void LLVMInitializeCodeGen(LLVMPassRegistryRef R);
|
void LLVMInitializeCodeGen(LLVMPassRegistryRef R);
|
||||||
void LLVMInitializeTarget(LLVMPassRegistryRef R);
|
void LLVMInitializeTarget(LLVMPassRegistryRef R);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,6 +20,13 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCLinkTimeOptimizer Link Time Optimization
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/// This provides a dummy type for pointers to the LTO object.
|
/// This provides a dummy type for pointers to the LTO object.
|
||||||
typedef void* llvm_lto_t;
|
typedef void* llvm_lto_t;
|
||||||
|
|
||||||
@ -51,6 +58,10 @@ extern "C" {
|
|||||||
extern llvm_lto_status_t llvm_optimize_modules
|
extern llvm_lto_status_t llvm_optimize_modules
|
||||||
(llvm_lto_t lto, const char* output_filename);
|
(llvm_lto_t lto, const char* output_filename);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,6 +28,13 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCObject Object file reading and writing
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
// Opaque type wrappers
|
// Opaque type wrappers
|
||||||
typedef struct LLVMOpaqueObjectFile *LLVMObjectFileRef;
|
typedef struct LLVMOpaqueObjectFile *LLVMObjectFileRef;
|
||||||
typedef struct LLVMOpaqueSectionIterator *LLVMSectionIteratorRef;
|
typedef struct LLVMOpaqueSectionIterator *LLVMSectionIteratorRef;
|
||||||
@ -86,6 +93,9 @@ uint64_t LLVMGetRelocationType(LLVMRelocationIteratorRef RI);
|
|||||||
const char *LLVMGetRelocationTypeName(LLVMRelocationIteratorRef RI);
|
const char *LLVMGetRelocationTypeName(LLVMRelocationIteratorRef RI);
|
||||||
const char *LLVMGetRelocationValueString(LLVMRelocationIteratorRef RI);
|
const char *LLVMGetRelocationValueString(LLVMRelocationIteratorRef RI);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,13 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCTarget Target information
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
enum LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian };
|
enum LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian };
|
||||||
|
|
||||||
typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
|
typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
|
||||||
@ -209,6 +216,9 @@ unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef, LLVMTypeRef StructTy,
|
|||||||
See the destructor llvm::TargetData::~TargetData. */
|
See the destructor llvm::TargetData::~TargetData. */
|
||||||
void LLVMDisposeTargetData(LLVMTargetDataRef);
|
void LLVMDisposeTargetData(LLVMTargetDataRef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,13 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCTransformsIPO Interprocedural transformations
|
||||||
|
* @ingroup LLVMCTransforms
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/** See llvm::createArgumentPromotionPass function. */
|
/** See llvm::createArgumentPromotionPass function. */
|
||||||
void LLVMAddArgumentPromotionPass(LLVMPassManagerRef PM);
|
void LLVMAddArgumentPromotionPass(LLVMPassManagerRef PM);
|
||||||
|
|
||||||
@ -63,6 +70,10 @@ void LLVMAddStripDeadPrototypesPass(LLVMPassManagerRef PM);
|
|||||||
/** See llvm::createStripSymbolsPass function. */
|
/** See llvm::createStripSymbolsPass function. */
|
||||||
void LLVMAddStripSymbolsPass(LLVMPassManagerRef PM);
|
void LLVMAddStripSymbolsPass(LLVMPassManagerRef PM);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* defined(__cplusplus) */
|
#endif /* defined(__cplusplus) */
|
||||||
|
@ -23,6 +23,13 @@ typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder
|
||||||
|
* @ingroup LLVMCTransforms
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/** See llvm::PassManagerBuilder. */
|
/** See llvm::PassManagerBuilder. */
|
||||||
LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void);
|
LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void);
|
||||||
void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB);
|
void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB);
|
||||||
@ -73,6 +80,10 @@ void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
|
|||||||
bool Internalize,
|
bool Internalize,
|
||||||
bool RunInliner);
|
bool RunInliner);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,13 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCTransformsScalar Scalar transformations
|
||||||
|
* @ingroup LLVMCTransforms
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/** See llvm::createAggressiveDCEPass function. */
|
/** See llvm::createAggressiveDCEPass function. */
|
||||||
void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM);
|
void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM);
|
||||||
|
|
||||||
@ -116,6 +123,9 @@ void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM);
|
|||||||
/** See llvm::createBasicAliasAnalysisPass function */
|
/** See llvm::createBasicAliasAnalysisPass function */
|
||||||
void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM);
|
void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -26,9 +26,20 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCTransformsVectorize Vectorization transformations
|
||||||
|
* @ingroup LLVMCTransforms
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/** See llvm::createBBVectorizePass function. */
|
/** See llvm::createBBVectorizePass function. */
|
||||||
void LLVMAddBBVectorizePass(LLVMPassManagerRef PM);
|
void LLVMAddBBVectorizePass(LLVMPassManagerRef PM);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* defined(__cplusplus) */
|
#endif /* defined(__cplusplus) */
|
||||||
|
@ -20,6 +20,13 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup LLVMCLTO LTO
|
||||||
|
* @ingroup LLVMC
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
#define LTO_API_VERSION 4
|
#define LTO_API_VERSION 4
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -289,5 +296,8 @@ lto_codegen_debug_options(lto_code_gen_t cg, const char *);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user