diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-04-08 17:31:24 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-04-08 17:31:24 +0000 |
commit | 18b81c52bb7bbc14c0f0114bd03d94963a70724d (patch) | |
tree | f7e72f0ae3eefaba7f91358b5e603e75265473dc /llvm/lib/ExecutionEngine/MCJIT | |
parent | 74c74ba81c4e091b27510cc36e2147e8fbf06ea4 (diff) | |
download | bcm5719-llvm-18b81c52bb7bbc14c0f0114bd03d94963a70724d.tar.gz bcm5719-llvm-18b81c52bb7bbc14c0f0114bd03d94963a70724d.zip |
Refactor MCJIT 32-bit section loading.
Teach 32-bit section loading to use the Memory Manager interface, just like
the 64-bit loading does. Tidy up a few other things here and there.
llvm-svn: 129138
Diffstat (limited to 'llvm/lib/ExecutionEngine/MCJIT')
-rw-r--r-- | llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h b/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h index 0108ecca84f..e3c6fda63b4 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h @@ -32,6 +32,9 @@ public: // a pointer to the allocated memory and update Size to reflect how much // memory was acutally allocated. uint8_t *startFunctionBody(const char *Name, uintptr_t &Size) { + // FIXME: This should really reference the MCAsmInfo to get the global + // prefix. + if (Name[0] == '_') ++Name; Function *F = M->getFunction(Name); assert(F && "No matching function in JIT IR Module!"); return JMM->startFunctionBody(F, Size); @@ -41,6 +44,9 @@ public: // memory was actually used. void endFunctionBody(const char *Name, uint8_t *FunctionStart, uint8_t *FunctionEnd) { + // FIXME: This should really reference the MCAsmInfo to get the global + // prefix. + if (Name[0] == '_') ++Name; Function *F = M->getFunction(Name); assert(F && "No matching function in JIT IR Module!"); JMM->endFunctionBody(F, FunctionStart, FunctionEnd); |