aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-03-29 23:23:59 +0000
committerBill Wendling <isanbard@gmail.com>2012-03-29 23:23:59 +0000
commit288967dfac246c8e35dc4f85afb667e74d1d26a8 (patch)
tree7dd4eef16e2e567d38180a3dbdbc01f5e9be3b0c /tools
parent7a4c071cd9f67599eba21e902079d0e85f2abf97 (diff)
downloadexternal_llvm-288967dfac246c8e35dc4f85afb667e74d1d26a8.zip
external_llvm-288967dfac246c8e35dc4f85afb667e74d1d26a8.tar.gz
external_llvm-288967dfac246c8e35dc4f85afb667e74d1d26a8.tar.bz2
Revert r153694. It was causing failures in the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153701 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-rtdyld/llvm-rtdyld.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/llvm-rtdyld/llvm-rtdyld.cpp b/tools/llvm-rtdyld/llvm-rtdyld.cpp
index 01a7d15..a21fc13 100644
--- a/tools/llvm-rtdyld/llvm-rtdyld.cpp
+++ b/tools/llvm-rtdyld/llvm-rtdyld.cpp
@@ -58,6 +58,10 @@ public:
uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
unsigned SectionID);
+ uint8_t *startFunctionBody(const char *Name, uintptr_t &Size);
+ void endFunctionBody(const char *Name, uint8_t *FunctionStart,
+ uint8_t *FunctionEnd);
+
virtual void *getPointerToNamedFunction(const std::string &Name,
bool AbortOnFailure = true) {
return 0;
@@ -77,6 +81,18 @@ uint8_t *TrivialMemoryManager::allocateDataSection(uintptr_t Size,
return (uint8_t*)sys::Memory::AllocateRWX(Size, 0, 0).base();
}
+uint8_t *TrivialMemoryManager::startFunctionBody(const char *Name,
+ uintptr_t &Size) {
+ return (uint8_t*)sys::Memory::AllocateRWX(Size, 0, 0).base();
+}
+
+void TrivialMemoryManager::endFunctionBody(const char *Name,
+ uint8_t *FunctionStart,
+ uint8_t *FunctionEnd) {
+ uintptr_t Size = FunctionEnd - FunctionStart + 1;
+ FunctionMemory.push_back(sys::MemoryBlock(FunctionStart, Size));
+}
+
static const char *ProgramName;
static void Message(const char *Type, const Twine &Msg) {