diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-05-27 18:03:56 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-05-27 18:03:56 +0000 |
| commit | 8232621124fe22fd0ed1060e6532fc5f824a7869 (patch) | |
| tree | a5d372b1cb1521e0f769c5c08fcdb6a71b7324c9 /llvm/lib/ExecutionEngine | |
| parent | e7bda9c0226b5b585914517cbb4f2e8d9a58990b (diff) | |
| download | bcm5719-llvm-8232621124fe22fd0ed1060e6532fc5f824a7869.tar.gz bcm5719-llvm-8232621124fe22fd0ed1060e6532fc5f824a7869.zip | |
This code is a real mess, but at least get the JIT *building* on platforms
(such as plan 9) without mmap. Of course it won't RUN... but that's another
step. :)
llvm-svn: 13839
Diffstat (limited to 'llvm/lib/ExecutionEngine')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/Emitter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/Emitter.cpp b/llvm/lib/ExecutionEngine/JIT/Emitter.cpp index 4cf4c15d3f9..4a69ac7fa81 100644 --- a/llvm/lib/ExecutionEngine/JIT/Emitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/Emitter.cpp @@ -60,6 +60,7 @@ static void *getMemory(unsigned NumBytes) { static const long pageSize = sysconf(_SC_PAGESIZE); unsigned NumPages = (NumBytes+pageSize-1)/pageSize; +/* FIXME: This should use the proper autoconf flags */ #if defined(i386) || defined(__i386__) || defined(__x86__) /* Linux and *BSD tend to have these flags named differently. */ #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) @@ -70,8 +71,10 @@ static void *getMemory(unsigned NumBytes) { #else std::cerr << "This architecture is not supported by the JIT!\n"; abort(); + return 0; #endif +#ifdef HAVE_MMAP int fd = -1; #if defined(__linux__) fd = 0; @@ -89,6 +92,11 @@ static void *getMemory(unsigned NumBytes) { abort(); } return pa; +#else + std::cerr << "Do not know how to allocate mem for the JIT without mmap!\n"; + abort(); + return 0; +#endif } JITMemoryManager::JITMemoryManager() { |

