diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-08-01 17:35:40 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-08-01 17:35:40 +0000 |
commit | 2b3b89c28e90ba9637614a398dc0eb743370a1c9 (patch) | |
tree | d48d31164412f9f82d508e1aa97d3da8494d5275 /lib/ExecutionEngine | |
parent | 88aad145a59726f4fb5f646f24cc1eb1b1f97071 (diff) | |
download | external_llvm-2b3b89c28e90ba9637614a398dc0eb743370a1c9.zip external_llvm-2b3b89c28e90ba9637614a398dc0eb743370a1c9.tar.gz external_llvm-2b3b89c28e90ba9637614a398dc0eb743370a1c9.tar.bz2 |
one cannot allocate a global, until one is done initializing the global pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22568 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index 88a8be4..d127708 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -91,17 +91,17 @@ JITMemoryManager::JITMemoryManager(bool useGOT) { ConstantBase = reinterpret_cast<unsigned char*>(ConstBlock.base()); GlobalBase = reinterpret_cast<unsigned char*>(GVBlock.base()); - //Allocate the GOT just like a global array - GOTBase = NULL; - if (useGOT) - GOTBase = allocateGlobal(sizeof(void*) * 8192, 8); - // Allocate stubs backwards from the base, allocate functions forward // from the base. CurStubPtr = CurFunctionPtr = FunctionBase + 512*1024;// Use 512k for stubs CurConstantPtr = ConstantBase + ConstBlock.size(); CurGlobalPtr = GlobalBase + GVBlock.size(); + + //Allocate the GOT just like a global array + GOTBase = NULL; + if (useGOT) + GOTBase = allocateGlobal(sizeof(void*) * 8192, 8); } JITMemoryManager::~JITMemoryManager() { |