#include "LLVMHeaders.h"
#define FOR_EACH_LLVM_API_FUNCTION(macro) \
+ macro(LLVMBool, ParseBitcode, (LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage)) \
+ macro(LLVMBool, ParseBitcodeInContext, (LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, char **OutMessage)) \
+ macro(LLVMBool, GetBitcodeModuleInContext, (LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, char **OutMessage)) \
+ macro(LLVMBool, GetBitcodeModule, (LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, char **OutMessage)) \
+ macro(LLVMBool, GetBitcodeModuleProviderInContext, (LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef *OutMP, char **OutMessage)) \
+ macro(LLVMBool, GetBitcodeModuleProvider, (LLVMMemoryBufferRef MemBuf, LLVMModuleProviderRef *OutMP, char **OutMessage)) \
+ macro(LLVMBool, LinkModules, (LLVMModuleRef Dest, LLVMModuleRef Str, LLVMLinkerMode Mode, char **OutMessage)) \
macro(void, InitializeCore, (LLVMPassRegistryRef R)) \
macro(void, Shutdown, ()) \
macro(char *, CreateMessage, (const char *Message)) \
macro(void, SetModuleInlineAsm, (LLVMModuleRef M, const char *Asm)) \
macro(LLVMContextRef, GetModuleContext, (LLVMModuleRef M)) \
macro(LLVMTypeRef, GetTypeByName, (LLVMModuleRef M, const char *Name)) \
+ macro(void, DumpType, (LLVMTypeRef Val)) \
macro(unsigned, GetNamedMetadataNumOperands, (LLVMModuleRef M, const char* name)) \
macro(void, GetNamedMetadataOperands, (LLVMModuleRef M, const char* name, LLVMValueRef *Dest)) \
macro(void, AddNamedMetadataOperand, (LLVMModuleRef M, const char* name, LLVMValueRef Val)) \
macro(double, GenericValueToFloat, (LLVMTypeRef TyRef, LLVMGenericValueRef GenVal)) \
macro(void, DisposeGenericValue, (LLVMGenericValueRef GenVal)) \
macro(LLVMBool, CreateExecutionEngineForModule, (LLVMExecutionEngineRef *OutEE, LLVMModuleRef M, char **OutError)) \
- macro(LLVMBool, CreateInterpreterForModule, (LLVMExecutionEngineRef *OutInterp, LLVMModuleRef M, char **OutError)) \
- macro(LLVMBool, CreateJITCompilerForModule, (LLVMExecutionEngineRef *OutJIT, LLVMModuleRef M, unsigned OptLevel, char **OutError)) \
macro(void, InitializeMCJITCompilerOptions, (struct LLVMMCJITCompilerOptions *Options, size_t SizeOfOptions)) \
macro(LLVMBool, CreateMCJITCompilerForModule, (LLVMExecutionEngineRef *OutJIT, LLVMModuleRef M, struct LLVMMCJITCompilerOptions *Options, size_t SizeOfOptions, char **OutError)) \
macro(LLVMBool, CreateExecutionEngine, (LLVMExecutionEngineRef *OutEE, LLVMModuleProviderRef MP, char **OutError)) \
- macro(LLVMBool, CreateInterpreter, (LLVMExecutionEngineRef *OutInterp, LLVMModuleProviderRef MP, char **OutError)) \
- macro(LLVMBool, CreateJITCompiler, (LLVMExecutionEngineRef *OutJIT, LLVMModuleProviderRef MP, unsigned OptLevel, char **OutError)) \
macro(void, DisposeExecutionEngine, (LLVMExecutionEngineRef EE)) \
macro(void, RunStaticConstructors, (LLVMExecutionEngineRef EE)) \
macro(void, RunStaticDestructors, (LLVMExecutionEngineRef EE)) \
macro(LLVMBool, FindFunction, (LLVMExecutionEngineRef EE, const char *Name, LLVMValueRef *OutFn)) \
macro(void *, RecompileAndRelinkFunction, (LLVMExecutionEngineRef EE, LLVMValueRef Fn)) \
macro(LLVMTargetDataRef, GetExecutionEngineTargetData, (LLVMExecutionEngineRef EE)) \
+ macro(LLVMTargetMachineRef, GetExecutionEngineTargetMachine, (LLVMExecutionEngineRef EE)) \
macro(void, AddGlobalMapping, (LLVMExecutionEngineRef EE, LLVMValueRef Global, void* Addr)) \
macro(void *, GetPointerToGlobal, (LLVMExecutionEngineRef EE, LLVMValueRef Global)) \
macro(LLVMMCJITMemoryManagerRef, CreateSimpleMCJITMemoryManager, (void *Opaque, LLVMMemoryManagerAllocateCodeSectionCallback AllocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory, LLVMMemoryManagerDestroyCallback Destory)) \
macro(void, PassManagerBuilderPopulateFunctionPassManager, (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)) \
macro(void, PassManagerBuilderPopulateModulePassManager, (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM)) \
macro(void, PassManagerBuilderPopulateLTOPassManager, (LLVMPassManagerBuilderRef PMB, LLVMPassManagerRef PM, LLVMBool Internalize, LLVMBool RunInliner)) \
+ macro(void, AddAnalysisPasses, (LLVMTargetMachineRef T, LLVMPassManagerRef PM)) \
+ macro(void, AddInternalizePass, (LLVMPassManagerRef PM, unsigned AllButMain)) \
macro(void, AddAggressiveDCEPass, (LLVMPassManagerRef PM)) \
macro(void, AddCFGSimplificationPass, (LLVMPassManagerRef PM)) \
macro(void, AddDeadStoreEliminationPass, (LLVMPassManagerRef PM)) \
+ macro(void, AddFunctionInliningPass, (LLVMPassManagerRef PM)) \
+ macro(void, AddGlobalDCEPass, (LLVMPassManagerRef PM)) \
+ macro(void, AddPruneEHPass, (LLVMPassManagerRef PM)) \
+ macro(void, AddIPSCCPPass, (LLVMPassManagerRef PM)) \
+ macro(void, AddDeadArgEliminationPass, (LLVMPassManagerRef PM)) \
+ macro(void, AddConstantMergePass, (LLVMPassManagerRef PM)) \
+ macro(void, AddGlobalOptimizerPass, (LLVMPassManagerRef PM)) \
macro(void, AddGVNPass, (LLVMPassManagerRef PM)) \
macro(void, AddIndVarSimplifyPass, (LLVMPassManagerRef PM)) \
macro(void, AddInstructionCombiningPass, (LLVMPassManagerRef PM)) \