summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2016-04-25 13:03:01 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-04-25 13:03:01 +0000
commit88b891534b7b9218faa7f021e5b0768a7b519ae3 (patch)
tree71eb536865b26d91fbdb3a5bcf7e473f4af247b9 /compiler/utils
parent6583646a6b65ce16a03b41466eddd385234eb7eb (diff)
parentbb661c0f0cb72d4bbfc2e251f6ded6949a713292 (diff)
Merge "Refactor use of __ANDROID__ macro"
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/assembler_thumb_test.cc8
-rw-r--r--compiler/utils/x86_64/assembler_x86_64_test.cc2
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/utils/assembler_thumb_test.cc b/compiler/utils/assembler_thumb_test.cc
index c67cb5a563..9c9271db33 100644
--- a/compiler/utils/assembler_thumb_test.cc
+++ b/compiler/utils/assembler_thumb_test.cc
@@ -32,7 +32,7 @@ namespace arm {
// Include results file (generated manually)
#include "assembler_thumb_test_expected.cc.inc"
-#ifndef __ANDROID__
+#ifndef ART_TARGET_ANDROID
// This controls whether the results are printed to the
// screen or compared against the expected output.
// To generate new expected output, set this to true and
@@ -72,7 +72,7 @@ void InitResults() {
}
std::string GetToolsDir() {
-#ifndef __ANDROID__
+#ifndef ART_TARGET_ANDROID
// This will only work on the host. There is no as, objcopy or objdump on the device.
static std::string toolsdir;
@@ -89,7 +89,7 @@ std::string GetToolsDir() {
}
void DumpAndCheck(std::vector<uint8_t>& code, const char* testname, const char* const* results) {
-#ifndef __ANDROID__
+#ifndef ART_TARGET_ANDROID
static std::string toolsdir = GetToolsDir();
ScratchFile file;
@@ -169,7 +169,7 @@ void DumpAndCheck(std::vector<uint8_t>& code, const char* testname, const char*
snprintf(buf, sizeof(buf), "%s.oo", filename);
unlink(buf);
-#endif
+#endif // ART_TARGET_ANDROID
}
#define __ assembler->
diff --git a/compiler/utils/x86_64/assembler_x86_64_test.cc b/compiler/utils/x86_64/assembler_x86_64_test.cc
index b19e616dd6..afe9207eb1 100644
--- a/compiler/utils/x86_64/assembler_x86_64_test.cc
+++ b/compiler/utils/x86_64/assembler_x86_64_test.cc
@@ -37,7 +37,7 @@ TEST(AssemblerX86_64, CreateBuffer) {
ASSERT_EQ(static_cast<size_t>(5), buffer.Size());
}
-#ifdef __ANDROID__
+#ifdef ART_TARGET_ANDROID
static constexpr size_t kRandomIterations = 1000; // Devices might be puny, don't stress them...
#else
static constexpr size_t kRandomIterations = 100000; // Hosts are pretty powerful.