summaryrefslogtreecommitdiff
path: root/compiler/utils/assembler_test.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-04-13 16:55:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-04-13 16:55:11 +0000
commit8d4b37ed048487561358e13e2a18ad9ca0dab3c0 (patch)
treef1d50e29322a92b66727a2a350731e11e32677bf /compiler/utils/assembler_test.h
parentde76960329b18f5330a9a08f24ba661516a93ac3 (diff)
parent93205e395f777c1dd81d3f164cf9a4aec4bde45f (diff)
Merge "Move Assemblers to the Arena."
Diffstat (limited to 'compiler/utils/assembler_test.h')
-rw-r--r--compiler/utils/assembler_test.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h
index 2579ddb52e..084e9011ba 100644
--- a/compiler/utils/assembler_test.h
+++ b/compiler/utils/assembler_test.h
@@ -460,7 +460,8 @@ class AssemblerTest : public testing::Test {
explicit AssemblerTest() {}
void SetUp() OVERRIDE {
- assembler_.reset(new Ass());
+ arena_.reset(new ArenaAllocator(&pool_));
+ assembler_.reset(new (arena_.get()) Ass(arena_.get()));
test_helper_.reset(
new AssemblerTestInfrastructure(GetArchitectureString(),
GetAssemblerCmdName(),
@@ -476,6 +477,8 @@ class AssemblerTest : public testing::Test {
void TearDown() OVERRIDE {
test_helper_.reset(); // Clean up the helper.
+ assembler_.reset();
+ arena_.reset();
}
// Override this to set up any architecture-specific things, e.g., register vectors.
@@ -919,6 +922,8 @@ class AssemblerTest : public testing::Test {
static constexpr size_t kWarnManyCombinationsThreshold = 500;
+ ArenaPool pool_;
+ std::unique_ptr<ArenaAllocator> arena_;
std::unique_ptr<Ass> assembler_;
std::unique_ptr<AssemblerTestInfrastructure> test_helper_;