mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191693 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -339,14 +339,10 @@ void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global) {
|
||||
namespace {
|
||||
|
||||
struct SimpleBindingMMFunctions {
|
||||
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 Destroy;
|
||||
};
|
||||
|
||||
class SimpleBindingMemoryManager : public RTDyldMemoryManager {
|
||||
@@ -415,14 +411,10 @@ bool SimpleBindingMemoryManager::finalizeMemory(std::string *ErrMsg) {
|
||||
|
||||
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 Destroy) {
|
||||
|
||||
if (!AllocateCodeSection || !AllocateDataSection || !FinalizeMemory ||
|
||||
!Destroy)
|
||||
|
||||
Reference in New Issue
Block a user