summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2009-11-11 05:30:02 +0000
committerJeffrey Yasskin <jyasskin@google.com>2009-11-11 05:30:02 +0000
commite822c99eaab2a31ef97b3c1bf555efdf52100777 (patch)
treeb509fd8dc84882a9b24240f2796031ffffce0f1b /llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
parent000c4ffd161c0726df06d0e1d7894a6b84a86f05 (diff)
downloadbcm5719-llvm-e822c99eaab2a31ef97b3c1bf555efdf52100777.tar.gz
bcm5719-llvm-e822c99eaab2a31ef97b3c1bf555efdf52100777.zip
Fix JITTest.ModuleDeletion in -Asserts mode (which turns off JITEmitDebugInfo
by default). llvm-svn: 86807
Diffstat (limited to 'llvm/unittests/ExecutionEngine/JIT/JITTest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/JIT/JITTest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp b/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
index 19765d4e60e..5b8d299f58f 100644
--- a/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
+++ b/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
@@ -434,10 +434,16 @@ TEST_F(JITTest, ModuleDeletion) {
RJMM->deallocateFunctionBodyCalls.size());
SmallPtrSet<const void*, 2> ExceptionTablesDeallocated;
+ unsigned NumTablesDeallocated = 0;
for (unsigned i = 0, e = RJMM->deallocateExceptionTableCalls.size();
i != e; ++i) {
ExceptionTablesDeallocated.insert(
RJMM->deallocateExceptionTableCalls[i].ET);
+ if (RJMM->deallocateExceptionTableCalls[i].ET != NULL) {
+ // If JITEmitDebugInfo is off, we'll "deallocate" NULL, which doesn't
+ // appear in startExceptionTableCalls.
+ NumTablesDeallocated++;
+ }
}
for (unsigned i = 0, e = RJMM->startExceptionTableCalls.size(); i != e; ++i) {
EXPECT_TRUE(ExceptionTablesDeallocated.count(
@@ -446,7 +452,7 @@ TEST_F(JITTest, ModuleDeletion) {
<< RJMM->startExceptionTableCalls[i].F_dump;
}
EXPECT_EQ(RJMM->startExceptionTableCalls.size(),
- RJMM->deallocateExceptionTableCalls.size());
+ NumTablesDeallocated);
}
// This code is copied from JITEventListenerTest, but it only runs once for all
OpenPOWER on IntegriCloud