[llvm-commits] [llvm] r86807 - /llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
Jeffrey Yasskin
jyasskin at google.com
Tue Nov 10 21:30:03 PST 2009
Author: jyasskin
Date: Tue Nov 10 23:30:02 2009
New Revision: 86807
URL: http://llvm.org/viewvc/llvm-project?rev=86807&view=rev
Log:
Fix JITTest.ModuleDeletion in -Asserts mode (which turns off JITEmitDebugInfo
by default).
Modified:
llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp?rev=86807&r1=86806&r2=86807&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp Tue Nov 10 23:30:02 2009
@@ -434,10 +434,16 @@
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 @@
<< 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
More information about the llvm-commits
mailing list