diff options
Diffstat (limited to 'contrib/llvm/tools/lli/RecordingMemoryManager.h')
-rw-r--r-- | contrib/llvm/tools/lli/RecordingMemoryManager.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/llvm/tools/lli/RecordingMemoryManager.h b/contrib/llvm/tools/lli/RecordingMemoryManager.h index 1590235..991f535 100644 --- a/contrib/llvm/tools/lli/RecordingMemoryManager.h +++ b/contrib/llvm/tools/lli/RecordingMemoryManager.h @@ -31,9 +31,15 @@ private: SmallVector<Allocation, 16> AllocatedDataMem; SmallVector<Allocation, 16> AllocatedCodeMem; + // FIXME: This is part of a work around to keep sections near one another + // when MCJIT performs relocations after code emission but before + // the generated code is moved to the remote target. + sys::MemoryBlock Near; + sys::MemoryBlock allocateSection(uintptr_t Size); + public: RecordingMemoryManager() {} - virtual ~RecordingMemoryManager() {} + virtual ~RecordingMemoryManager(); typedef SmallVectorImpl<Allocation>::const_iterator const_data_iterator; typedef SmallVectorImpl<Allocation>::const_iterator const_code_iterator; @@ -47,10 +53,13 @@ public: unsigned SectionID); uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID); + unsigned SectionID, bool IsReadOnly); void *getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure = true); + + bool applyPermissions(std::string *ErrMsg) { return false; } + // The following obsolete JITMemoryManager calls are stubbed out for // this model. void setMemoryWritable(); |