Fix memory leaks in TestArm64InstEmulation
Summary: We never delete the created instances, so those test fail with the memory sanitizer. Reviewers: jasonmolenda Reviewed By: jasonmolenda Subscribers: aemerson, javed.absar, kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D42336 llvm-svn: 323076
This commit is contained in:
parent
fbdf0b9315
commit
bb3c570633
|
|
@ -56,9 +56,9 @@ void TestArm64InstEmulation::TearDownTestCase() {
|
|||
|
||||
TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) {
|
||||
ArchSpec arch("arm64-apple-ios10");
|
||||
UnwindAssemblyInstEmulation *engine =
|
||||
std::unique_ptr<UnwindAssemblyInstEmulation> engine(
|
||||
static_cast<UnwindAssemblyInstEmulation *>(
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch));
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch)));
|
||||
ASSERT_NE(nullptr, engine);
|
||||
|
||||
UnwindPlan::RowSP row_sp;
|
||||
|
|
@ -152,9 +152,9 @@ TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) {
|
|||
|
||||
TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
||||
ArchSpec arch("arm64-apple-ios10");
|
||||
UnwindAssemblyInstEmulation *engine =
|
||||
std::unique_ptr<UnwindAssemblyInstEmulation> engine(
|
||||
static_cast<UnwindAssemblyInstEmulation *>(
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch));
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch)));
|
||||
ASSERT_NE(nullptr, engine);
|
||||
|
||||
UnwindPlan::RowSP row_sp;
|
||||
|
|
@ -314,9 +314,9 @@ TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) {
|
|||
|
||||
TEST_F(TestArm64InstEmulation, TestFramelessThreeEpilogueFunction) {
|
||||
ArchSpec arch("arm64-apple-ios10");
|
||||
UnwindAssemblyInstEmulation *engine =
|
||||
std::unique_ptr<UnwindAssemblyInstEmulation> engine(
|
||||
static_cast<UnwindAssemblyInstEmulation *>(
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch));
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch)));
|
||||
ASSERT_NE(nullptr, engine);
|
||||
|
||||
UnwindPlan::RowSP row_sp;
|
||||
|
|
@ -409,9 +409,9 @@ TEST_F(TestArm64InstEmulation, TestFramelessThreeEpilogueFunction) {
|
|||
|
||||
TEST_F(TestArm64InstEmulation, TestRegisterSavedTwice) {
|
||||
ArchSpec arch("arm64-apple-ios10");
|
||||
UnwindAssemblyInstEmulation *engine =
|
||||
std::unique_ptr<UnwindAssemblyInstEmulation> engine(
|
||||
static_cast<UnwindAssemblyInstEmulation *>(
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch));
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch)));
|
||||
ASSERT_NE(nullptr, engine);
|
||||
|
||||
UnwindPlan::RowSP row_sp;
|
||||
|
|
@ -511,9 +511,9 @@ TEST_F(TestArm64InstEmulation, TestRegisterSavedTwice) {
|
|||
|
||||
TEST_F(TestArm64InstEmulation, TestRegisterDoubleSpills) {
|
||||
ArchSpec arch("arm64-apple-ios10");
|
||||
UnwindAssemblyInstEmulation *engine =
|
||||
std::unique_ptr<UnwindAssemblyInstEmulation> engine(
|
||||
static_cast<UnwindAssemblyInstEmulation *>(
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch));
|
||||
UnwindAssemblyInstEmulation::CreateInstance(arch)));
|
||||
ASSERT_NE(nullptr, engine);
|
||||
|
||||
UnwindPlan::RowSP row_sp;
|
||||
|
|
|
|||
Loading…
Reference in New Issue