summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm-c/ExecutionEngine.h15
-rw-r--r--llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h12
-rw-r--r--llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h4
3 files changed, 18 insertions, 13 deletions
diff --git a/llvm/include/llvm-c/ExecutionEngine.h b/llvm/include/llvm-c/ExecutionEngine.h
index cf3565c217e..4e767b2e641 100644
--- a/llvm/include/llvm-c/ExecutionEngine.h
+++ b/llvm/include/llvm-c/ExecutionEngine.h
@@ -171,13 +171,14 @@ 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 uint8_t *(*LLVMMemoryManagerAllocateCodeSectionCallback)(
+ void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID,
+ const char *SectionName);
+typedef uint8_t *(*LLVMMemoryManagerAllocateDataSectionCallback)(
+ void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID,
+ const char *SectionName, LLVMBool IsReadOnly);
+typedef LLVMBool (*LLVMMemoryManagerFinalizeMemoryCallback)(
+ void *Opaque, char **ErrMsg);
typedef void (*LLVMMemoryManagerDestroyCallback)(void *Opaque);
/**
diff --git a/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h b/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
index 02e6b19b91c..59326875850 100644
--- a/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
+++ b/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
@@ -38,14 +38,16 @@ public:
/// executable code. The SectionID is a unique identifier assigned by the JIT
/// engine, and optionally recorded by the memory manager to access a loaded
/// section.
- virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
- unsigned SectionID) = 0;
-
+ virtual uint8_t *allocateCodeSection(
+ uintptr_t Size, unsigned Alignment, unsigned SectionID,
+ StringRef SectionName) = 0;
+
/// Allocate a memory block of (at least) the given size suitable for data.
/// The SectionID is a unique identifier assigned by the JIT engine, and
/// optionally recorded by the memory manager to access a loaded section.
- virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
- unsigned SectionID, bool IsReadOnly) = 0;
+ virtual uint8_t *allocateDataSection(
+ uintptr_t Size, unsigned Alignment, unsigned SectionID,
+ StringRef SectionName, bool IsReadOnly) = 0;
/// Register the EH frames with the runtime so that c++ exceptions work.
virtual void registerEHFrames(StringRef SectionData);
diff --git a/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h b/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
index 6ee2a2aae59..fd6e41f91ff 100644
--- a/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
+++ b/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
@@ -49,7 +49,8 @@ public:
/// The value of \p Alignment must be a power of two. If \p Alignment is zero
/// a default alignment of 16 will be used.
virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
- unsigned SectionID);
+ unsigned SectionID,
+ StringRef SectionName);
/// \brief Allocates a memory block of (at least) the given size suitable for
/// executable code.
@@ -58,6 +59,7 @@ public:
/// a default alignment of 16 will be used.
virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
unsigned SectionID,
+ StringRef SectionName,
bool isReadOnly);
/// \brief Update section-specific memory permissions and other attributes.
OpenPOWER on IntegriCloud