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
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index e261ee6..70144c8 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -18,6 +18,7 @@
#include <sys/stat.h>
+#include <memory>
#include <vector>
#include "base/logging.h"
@@ -52,7 +53,6 @@
#include "runtime.h"
#include "scoped_thread_state_change.h"
#include "handle_scope-inl.h"
-#include "UniquePtrCompat.h"
#include "utils.h"
using ::art::mirror::ArtField;
@@ -77,7 +77,7 @@
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
- UniquePtr<File> oat_file(OS::OpenFileReadWrite(oat_filename.c_str()));
+ std::unique_ptr<File> oat_file(OS::OpenFileReadWrite(oat_filename.c_str()));
if (oat_file.get() == NULL) {
LOG(ERROR) << "Failed to open oat file " << oat_filename << " for " << oat_location;
return false;
@@ -141,7 +141,7 @@
PatchOatCodeAndMethods();
Thread::Current()->TransitionFromRunnableToSuspended(kNative);
- UniquePtr<File> image_file(OS::CreateEmptyFile(image_filename.c_str()));
+ std::unique_ptr<File> image_file(OS::CreateEmptyFile(image_filename.c_str()));
ImageHeader* image_header = reinterpret_cast<ImageHeader*>(image_->Begin());
if (image_file.get() == NULL) {
LOG(ERROR) << "Failed to open image file " << image_filename;
@@ -418,7 +418,7 @@
}
// build an Object[] of the roots needed to restore the runtime
- Handle<ObjectArray<Object> > image_roots(hs.NewHandle(
+ Handle<ObjectArray<Object>> image_roots(hs.NewHandle(
ObjectArray<Object>::Alloc(self, object_array_class.Get(), ImageHeader::kImageRootsMax)));
image_roots->Set<false>(ImageHeader::kResolutionMethod, runtime->GetResolutionMethod());
image_roots->Set<false>(ImageHeader::kImtConflictMethod, runtime->GetImtConflictMethod());