| commit | 75c21a9428de1854b2bf8caa83254a207b37c6ad | [log] [tgz] |
|---|---|---|
| author | Easwaran Raman <eraman@google.com> | Thu Mar 03 23:55:41 2016 +0000 |
| committer | Easwaran Raman <eraman@google.com> | Thu Mar 03 23:55:41 2016 +0000 |
| tree | 61ad3a36cdd4640f7712fda8f6151028a46ddc4c | |
| parent | b8627a89a63f4901cf60071140d4ddf33ce67aa5 [diff] |
Fix memory leak in tests. llvm-svn: 262674
diff --git a/llvm/unittests/ProfileData/InstrProfTest.cpp b/llvm/unittests/ProfileData/InstrProfTest.cpp index 447f7a2..46e493e 100644 --- a/llvm/unittests/ProfileData/InstrProfTest.cpp +++ b/llvm/unittests/ProfileData/InstrProfTest.cpp
@@ -187,6 +187,7 @@ ASSERT_TRUE(isa<InstrProfSummary>(PSFromMD)); InstrProfSummary *IPS = cast<InstrProfSummary>(PSFromMD); VerifySummary(*IPS, false); + delete IPS; } TEST_P(MaybeSparseInstrProfTest, get_icall_data_read_write) {
diff --git a/llvm/unittests/ProfileData/SampleProfTest.cpp b/llvm/unittests/ProfileData/SampleProfTest.cpp index 5ab4f56..9738e97 100644 --- a/llvm/unittests/ProfileData/SampleProfTest.cpp +++ b/llvm/unittests/ProfileData/SampleProfTest.cpp
@@ -133,6 +133,7 @@ ASSERT_TRUE(isa<SampleProfileSummary>(PS)); SampleProfileSummary *SPS = cast<SampleProfileSummary>(PS); VerifySummary(*SPS); + delete SPS; } };