1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Fix JITTest.ModuleDeletion in -Asserts mode (which turns off JITEmitDebugInfo

by default).

llvm-svn: 86807
This commit is contained in:
Jeffrey Yasskin 2009-11-11 05:30:02 +00:00
parent 746b4b7f2a
commit 92dc6cb703

View File

@ -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