From 54159c6c6fe529a55ef3d15a3c8418362d5a43fb Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 20 Jun 2018 14:30:08 +0100 Subject: Use HashSet instead of unordered_set<>. Change the default parameters for HashSet to allow passing StringPiece as a key, avoiding an unnecessary allocation. Use the HashSet instead of std::unordered_set. Rename HashSet<> functions that mirror std::unordered_multiset<> to lower-case. Fix CompilerDriver::LoadImageClasses() to avoid using invalidated iterator. Test: m test-art-host-gtest Test: testrunner.py --host Change-Id: I7f8b82ee0b07befc5a0ee1c420b08a2068ad931e --- compiler/common_compiler_test.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/common_compiler_test.h') diff --git a/compiler/common_compiler_test.h b/compiler/common_compiler_test.h index 39c8bd817b..46b59a35be 100644 --- a/compiler/common_compiler_test.h +++ b/compiler/common_compiler_test.h @@ -18,9 +18,9 @@ #define ART_COMPILER_COMMON_COMPILER_TEST_H_ #include -#include #include +#include "base/hash_set.h" #include "common_runtime_test.h" #include "compiler.h" #include "oat_file.h" @@ -63,9 +63,8 @@ class CommonCompilerTest : public CommonRuntimeTest { InstructionSet GetInstructionSet() const; - // Get the set of image classes given to the compiler-driver in SetUp. Note: the compiler - // driver assumes ownership of the set, so the test should properly release the set. - virtual std::unordered_set* GetImageClasses(); + // Get the set of image classes given to the compiler-driver in SetUp. + virtual std::unique_ptr> GetImageClasses(); virtual ProfileCompilationInfo* GetProfileCompilationInfo(); -- cgit v1.2.3-59-g8ed1b