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/jni/jni_compiler_test.cc b/compiler/jni/jni_compiler_test.cc
index 561d00f..9927fe1 100644
--- a/compiler/jni/jni_compiler_test.cc
+++ b/compiler/jni/jni_compiler_test.cc
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <memory>
+
#include "class_linker.h"
#include "common_compiler_test.h"
#include "dex_file.h"
@@ -31,7 +33,6 @@
#include "ScopedLocalRef.h"
#include "scoped_thread_state_change.h"
#include "thread.h"
-#include "UniquePtrCompat.h"
extern "C" JNIEXPORT jint JNICALL Java_MyClassNatives_bar(JNIEnv*, jobject, jint count) {
return count + 1;
diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc
index 02d6fa5..7664a7f 100644
--- a/compiler/jni/quick/jni_compiler.cc
+++ b/compiler/jni/quick/jni_compiler.cc
@@ -15,6 +15,7 @@
*/
#include <algorithm>
+#include <memory>
#include <vector>
#include "base/logging.h"
@@ -33,7 +34,6 @@
#include "utils/mips/managed_register_mips.h"
#include "utils/x86/managed_register_x86.h"
#include "thread.h"
-#include "UniquePtrCompat.h"
#define __ jni_asm->
@@ -66,11 +66,11 @@
}
const bool is_64_bit_target = Is64BitInstructionSet(instruction_set);
// Calling conventions used to iterate over parameters to method
- UniquePtr<JniCallingConvention> main_jni_conv(
+ std::unique_ptr<JniCallingConvention> main_jni_conv(
JniCallingConvention::Create(is_static, is_synchronized, shorty, instruction_set));
bool reference_return = main_jni_conv->IsReturnAReference();
- UniquePtr<ManagedRuntimeCallingConvention> mr_conv(
+ std::unique_ptr<ManagedRuntimeCallingConvention> mr_conv(
ManagedRuntimeCallingConvention::Create(is_static, is_synchronized, shorty, instruction_set));
// Calling conventions to call into JNI method "end" possibly passing a returned reference, the
@@ -86,11 +86,11 @@
jni_end_shorty = "V";
}
- UniquePtr<JniCallingConvention> end_jni_conv(
+ std::unique_ptr<JniCallingConvention> end_jni_conv(
JniCallingConvention::Create(is_static, is_synchronized, jni_end_shorty, instruction_set));
// Assembler that holds generated instructions
- UniquePtr<Assembler> jni_asm(Assembler::Create(instruction_set));
+ std::unique_ptr<Assembler> jni_asm(Assembler::Create(instruction_set));
// Offsets into data structures
// TODO: if cross compiling these offsets are for the host not the target