diff options
author | Ian Rogers <irogers@google.com> | 2014-05-19 16:49:03 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-05-19 22:27:39 -0700 |
commit | 700a402244a1a423da4f3ba8032459f4b65fa18f (patch) | |
tree | 4c22fcda04d271bd55a37aff30650214af17a90c /compiler/utils | |
parent | 047c11adcbcbc0bcf210defdfcbada763961ffee (diff) | |
download | art-700a402244a1a423da4f3ba8032459f4b65fa18f.tar.gz art-700a402244a1a423da4f3ba8032459f4b65fa18f.tar.bz2 art-700a402244a1a423da4f3ba8032459f4b65fa18f.zip |
Now we have a proper C++ library, use std::unique_ptr.
Also remove the Android.libcxx.mk and other bits of stlport compatibility
mechanics.
Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/arm64/assembler_arm64.h | 4 | ||||
-rw-r--r-- | compiler/utils/assembler_test.h | 6 | ||||
-rw-r--r-- | compiler/utils/dedupe_set.h | 2 | ||||
-rw-r--r-- | compiler/utils/scoped_arena_containers.h | 10 | ||||
-rw-r--r-- | compiler/utils/scoped_hashtable.h | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/compiler/utils/arm64/assembler_arm64.h b/compiler/utils/arm64/assembler_arm64.h index 0f4a9a44e7..ab4999a2bc 100644 --- a/compiler/utils/arm64/assembler_arm64.h +++ b/compiler/utils/arm64/assembler_arm64.h @@ -17,8 +17,9 @@ #ifndef ART_COMPILER_UTILS_ARM64_ASSEMBLER_ARM64_H_ #define ART_COMPILER_UTILS_ARM64_ASSEMBLER_ARM64_H_ -#include <vector> #include <stdint.h> +#include <memory> +#include <vector> #include "base/logging.h" #include "constants_arm64.h" @@ -26,7 +27,6 @@ #include "utils/assembler.h" #include "offsets.h" #include "utils.h" -#include "UniquePtrCompat.h" #include "a64/macro-assembler-a64.h" #include "a64/disasm-a64.h" diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h index 1b050cf88d..754496b332 100644 --- a/compiler/utils/assembler_test.h +++ b/compiler/utils/assembler_test.h @@ -347,7 +347,7 @@ class AssemblerTest : public testing::Test { } size_t cs = assembler_->CodeSize(); - UniquePtr<std::vector<uint8_t> > data(new std::vector<uint8_t>(cs)); + std::unique_ptr<std::vector<uint8_t>> data(new std::vector<uint8_t>(cs)); MemoryRegion code(&(*data)[0], data->size()); assembler_->FinalizeInstructions(code); @@ -375,7 +375,7 @@ class AssemblerTest : public testing::Test { bool ok; std::string error_msg; std::string base_name; - UniquePtr<std::vector<uint8_t>> code; + std::unique_ptr<std::vector<uint8_t>> code; uintptr_t length; }; @@ -681,7 +681,7 @@ class AssemblerTest : public testing::Test { return tmpnam_; } - UniquePtr<Ass> assembler_; + std::unique_ptr<Ass> assembler_; std::string resolved_assembler_cmd_; std::string resolved_objdump_cmd_; diff --git a/compiler/utils/dedupe_set.h b/compiler/utils/dedupe_set.h index 7cc253ccdb..4c52174936 100644 --- a/compiler/utils/dedupe_set.h +++ b/compiler/utils/dedupe_set.h @@ -77,7 +77,7 @@ class DedupeSet { private: std::string lock_name_[kShard]; - UniquePtr<Mutex> lock_[kShard]; + std::unique_ptr<Mutex> lock_[kShard]; std::set<HashedKey, Comparator> keys_[kShard]; DISALLOW_COPY_AND_ASSIGN(DedupeSet); diff --git a/compiler/utils/scoped_arena_containers.h b/compiler/utils/scoped_arena_containers.h index c6fefde7c7..5deb6614d5 100644 --- a/compiler/utils/scoped_arena_containers.h +++ b/compiler/utils/scoped_arena_containers.h @@ -26,14 +26,14 @@ namespace art { template <typename T> -using ScopedArenaVector = std::vector<T, ScopedArenaAllocatorAdapter<T> >; +using ScopedArenaVector = std::vector<T, ScopedArenaAllocatorAdapter<T>>; -template <typename T, typename Comparator = std::less<T> > -using ScopedArenaSet = std::set<T, Comparator, ScopedArenaAllocatorAdapter<T> >; +template <typename T, typename Comparator = std::less<T>> +using ScopedArenaSet = std::set<T, Comparator, ScopedArenaAllocatorAdapter<T>>; -template <typename K, typename V, typename Comparator = std::less<K> > +template <typename K, typename V, typename Comparator = std::less<K>> using ScopedArenaSafeMap = - SafeMap<K, V, Comparator, ScopedArenaAllocatorAdapter<std::pair<const K, V> > >; + SafeMap<K, V, Comparator, ScopedArenaAllocatorAdapter<std::pair<const K, V>>>; } // namespace art diff --git a/compiler/utils/scoped_hashtable.h b/compiler/utils/scoped_hashtable.h index ccec7bafa4..bf8dd1fca7 100644 --- a/compiler/utils/scoped_hashtable.h +++ b/compiler/utils/scoped_hashtable.h @@ -36,7 +36,7 @@ class ScopedHashtable { // Lookups entry K starting from the current (topmost) scope // and returns its value if found or NULL. V Lookup(K k) const { - for (typename std::list<std::map<K, V> >::const_iterator scopes_it = scopes.begin(); + for (typename std::list<std::map<K, V>>::const_iterator scopes_it = scopes.begin(); scopes_it != scopes.end(); scopes_it++) { typename std::map<K, V>::const_iterator result_it = (*scopes_it).find(k); if (result_it != (*scopes_it).end()) { @@ -64,7 +64,7 @@ class ScopedHashtable { } private: - std::list<std::map<K, V> > scopes; + std::list<std::map<K, V>> scopes; }; } // namespace utils |