[llvm] r262674 - Fix memory leak in tests.
Easwaran Raman via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 15:55:41 PST 2016
Author: eraman
Date: Thu Mar 3 17:55:41 2016
New Revision: 262674
URL: http://llvm.org/viewvc/llvm-project?rev=262674&view=rev
Log:
Fix memory leak in tests.
Modified:
llvm/trunk/unittests/ProfileData/InstrProfTest.cpp
llvm/trunk/unittests/ProfileData/SampleProfTest.cpp
Modified: llvm/trunk/unittests/ProfileData/InstrProfTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ProfileData/InstrProfTest.cpp?rev=262674&r1=262673&r2=262674&view=diff
==============================================================================
--- llvm/trunk/unittests/ProfileData/InstrProfTest.cpp (original)
+++ llvm/trunk/unittests/ProfileData/InstrProfTest.cpp Thu Mar 3 17:55:41 2016
@@ -187,6 +187,7 @@ TEST_F(InstrProfTest, get_profile_summar
ASSERT_TRUE(isa<InstrProfSummary>(PSFromMD));
InstrProfSummary *IPS = cast<InstrProfSummary>(PSFromMD);
VerifySummary(*IPS, false);
+ delete IPS;
}
TEST_P(MaybeSparseInstrProfTest, get_icall_data_read_write) {
Modified: llvm/trunk/unittests/ProfileData/SampleProfTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ProfileData/SampleProfTest.cpp?rev=262674&r1=262673&r2=262674&view=diff
==============================================================================
--- llvm/trunk/unittests/ProfileData/SampleProfTest.cpp (original)
+++ llvm/trunk/unittests/ProfileData/SampleProfTest.cpp Thu Mar 3 17:55:41 2016
@@ -133,6 +133,7 @@ struct SampleProfTest : ::testing::Test
ASSERT_TRUE(isa<SampleProfileSummary>(PS));
SampleProfileSummary *SPS = cast<SampleProfileSummary>(PS);
VerifySummary(*SPS);
+ delete SPS;
}
};
More information about the llvm-commits
mailing list