[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Jul 7 10:31:53 PDT 2006
Changes in directory llvm/lib/ExecutionEngine/JIT:
JITEmitter.cpp updated: 1.105 -> 1.106
---
Log message:
Change AllocateRWX/DeallocateRWX do not throw an exception.
---
Diffs of the changes: (+8 -8)
JITEmitter.cpp | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.105 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.106
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.105 Thu Jun 22 20:02:37 2006
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Fri Jul 7 12:31:41 2006
@@ -414,17 +414,17 @@
}
sys::MemoryBlock JITMemoryManager::getNewMemoryBlock(unsigned size) {
- try {
- // Allocate a new block close to the last one.
- const sys::MemoryBlock *BOld = Blocks.empty() ? 0 : &Blocks.front();
- sys::MemoryBlock B = sys::Memory::AllocateRWX(size, BOld);
- Blocks.push_back(B);
- return B;
- } catch (std::string &err) {
+ // Allocate a new block close to the last one.
+ const sys::MemoryBlock *BOld = Blocks.empty() ? 0 : &Blocks.front();
+ std::string ErrMsg;
+ sys::MemoryBlock B = sys::Memory::AllocateRWX(size, BOld, &ErrMsg);
+ if (B.base() == 0) {
std::cerr << "Allocation failed when allocating new memory in the JIT\n";
- std::cerr << err << "\n";
+ std::cerr << ErrMsg << "\n";
abort();
}
+ Blocks.push_back(B);
+ return B;
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list