summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-04-06 17:17:34 -0700
committerAndreas Gampe <agampe@google.com>2015-04-06 17:20:45 -0700
commit79dda4251d7e3a7888e326bc7a3f069d6190d194 (patch)
tree85124678fed07a139869d66d37998a9f876dda3f
parentfb9131bd25b5a90e49da5e0f44b23e106558e7e0 (diff)
downloadart-79dda4251d7e3a7888e326bc7a3f069d6190d194.tar.gz
art-79dda4251d7e3a7888e326bc7a3f069d6190d194.tar.bz2
art-79dda4251d7e3a7888e326bc7a3f069d6190d194.zip
ART: Fix noreturn for Mac
Change-Id: I59b60340a90672a4de4d3bdf092fa504394d5892
-rw-r--r--runtime/entrypoints/quick/quick_alloc_entrypoints.cc20
-rw-r--r--runtime/entrypoints/quick/quick_alloc_entrypoints.h4
2 files changed, 17 insertions, 7 deletions
diff --git a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
index c049e3d355..49350ca5f2 100644
--- a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
@@ -230,8 +230,13 @@ void SetQuickAllocEntryPointsInstrumented(bool instrumented) {
entry_points_instrumented = instrumented;
}
+#if defined(__APPLE__) && defined(__LP64__)
+void ResetQuickAllocEntryPoints(QuickEntryPoints* qpoints ATTRIBUTE_UNUSED) {
+ UNIMPLEMENTED(FATAL);
+ UNREACHABLE();
+}
+#else
void ResetQuickAllocEntryPoints(QuickEntryPoints* qpoints) {
-#if !defined(__APPLE__) || !defined(__LP64__)
switch (entry_points_allocator) {
case gc::kAllocatorTypeDlMalloc: {
SetQuickAllocEntryPoints_dlmalloc(qpoints, entry_points_instrumented);
@@ -261,14 +266,15 @@ void ResetQuickAllocEntryPoints(QuickEntryPoints* qpoints) {
SetQuickAllocEntryPoints_region_tlab(qpoints, entry_points_instrumented);
return;
}
- default:
- break;
+
+ case gc::kAllocatorTypeLOS:
+ case gc::kAllocatorTypeNonMoving:
+ UNIMPLEMENTED(FATAL) << "Unexpected allocator type " << entry_points_allocator;
+ UNREACHABLE();
}
-#else
- UNUSED(qpoints);
-#endif
- UNIMPLEMENTED(FATAL);
+ LOG(FATAL);
UNREACHABLE();
}
+#endif
} // namespace art
diff --git a/runtime/entrypoints/quick/quick_alloc_entrypoints.h b/runtime/entrypoints/quick/quick_alloc_entrypoints.h
index ec0aef57a7..a99dc8a292 100644
--- a/runtime/entrypoints/quick/quick_alloc_entrypoints.h
+++ b/runtime/entrypoints/quick/quick_alloc_entrypoints.h
@@ -17,12 +17,16 @@
#ifndef ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ALLOC_ENTRYPOINTS_H_
#define ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_ALLOC_ENTRYPOINTS_H_
+#include "base/macros.h"
#include "base/mutex.h"
#include "gc/allocator_type.h"
#include "quick_entrypoints.h"
namespace art {
+#if defined(__APPLE__) && defined(__LP64__)
+NO_RETURN
+#endif
void ResetQuickAllocEntryPoints(QuickEntryPoints* qpoints);
// Runtime shutdown lock is necessary to prevent races in thread initialization. When the thread is