summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/ExecutionEngine.h
diff options
context:
space:
mode:
authorAnders Waldenborg <anders@0x63.nu>2013-09-30 19:11:32 +0000
committerAnders Waldenborg <anders@0x63.nu>2013-09-30 19:11:32 +0000
commit9515b31096e3ef3f00acb9cbd8f4e6f4770005ff (patch)
tree22a29f3f69e2d6385afdc64b46e6a7340e7b53ef /llvm/include/llvm-c/ExecutionEngine.h
parent9fd9f84f480f1d260f6d6feb551b654a0d38ebfd (diff)
downloadbcm5719-llvm-9515b31096e3ef3f00acb9cbd8f4e6f4770005ff.tar.gz
bcm5719-llvm-9515b31096e3ef3f00acb9cbd8f4e6f4770005ff.zip
llvm-c: use typedef for function pointers
This makes it consistent with other function pointers used in llvm-c Differential Revision: http://llvm-reviews.chandlerc.com/D1712 llvm-svn: 191693
Diffstat (limited to 'llvm/include/llvm-c/ExecutionEngine.h')
-rw-r--r--llvm/include/llvm-c/ExecutionEngine.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/llvm/include/llvm-c/ExecutionEngine.h b/llvm/include/llvm-c/ExecutionEngine.h
index 50fdb6bd735..cf3565c217e 100644
--- a/llvm/include/llvm-c/ExecutionEngine.h
+++ b/llvm/include/llvm-c/ExecutionEngine.h
@@ -171,6 +171,15 @@ void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global);
/*===-- Operations on memory managers -------------------------------------===*/
+typedef uint8_t *(*LLVMMemoryManagerAllocateCodeSectionCallback)(void *Opaque,
+ uintptr_t Size, unsigned Alignment,
+ unsigned SectionID);
+typedef uint8_t *(*LLVMMemoryManagerAllocateDataSectionCallback)(void *Opaque,
+ uintptr_t Size, unsigned Alignment,
+ unsigned SectionID, LLVMBool IsReadOnly);
+typedef LLVMBool (*LLVMMemoryManagerFinalizeMemoryCallback)(void *Opaque, char **ErrMsg);
+typedef void (*LLVMMemoryManagerDestroyCallback)(void *Opaque);
+
/**
* Create a simple custom MCJIT memory manager. This memory manager can
* intercept allocations in a module-oblivious way. This will return NULL
@@ -184,14 +193,10 @@ void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global);
*/
LLVMMCJITMemoryManagerRef LLVMCreateSimpleMCJITMemoryManager(
void *Opaque,
- uint8_t *(*AllocateCodeSection)(void *Opaque,
- uintptr_t Size, unsigned Alignment,
- unsigned SectionID),
- uint8_t *(*AllocateDataSection)(void *Opaque,
- uintptr_t Size, unsigned Alignment,
- unsigned SectionID, LLVMBool IsReadOnly),
- LLVMBool (*FinalizeMemory)(void *Opaque, char **ErrMsg),
- void (*Destroy)(void *Opaque));
+ LLVMMemoryManagerAllocateCodeSectionCallback AllocateCodeSection,
+ LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection,
+ LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory,
+ LLVMMemoryManagerDestroyCallback Destory);
void LLVMDisposeMCJITMemoryManager(LLVMMCJITMemoryManagerRef MM);
OpenPOWER on IntegriCloud