From e9ea70bb806f7c1dcd57efb6f48f1d6329d5f103 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Mon, 14 Apr 2014 15:52:08 -0700 Subject: [PATCH] Fix clang build. Change-Id: Iaf0b76cfc02bac5f49ab98d494db9a774211f453 --- runtime/gc/accounting/space_bitmap-inl.h | 4 ++-- runtime/gc/accounting/space_bitmap.h | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/runtime/gc/accounting/space_bitmap-inl.h b/runtime/gc/accounting/space_bitmap-inl.h index 08f7c8730..ed140e0f2 100644 --- a/runtime/gc/accounting/space_bitmap-inl.h +++ b/runtime/gc/accounting/space_bitmap-inl.h @@ -68,8 +68,8 @@ inline bool SpaceBitmap::Test(const mirror::Object* obj) const { } template template -void SpaceBitmap::VisitMarkedRange(uintptr_t visit_begin, uintptr_t visit_end, - const Visitor& visitor) const { +inline void SpaceBitmap::VisitMarkedRange(uintptr_t visit_begin, uintptr_t visit_end, + const Visitor& visitor) const { DCHECK_LT(visit_begin, visit_end); #if 0 for (uintptr_t i = visit_begin; i < visit_end; i += kAlignment) { diff --git a/runtime/gc/accounting/space_bitmap.h b/runtime/gc/accounting/space_bitmap.h index 891c8edda..b90a7998a 100644 --- a/runtime/gc/accounting/space_bitmap.h +++ b/runtime/gc/accounting/space_bitmap.h @@ -122,13 +122,12 @@ class SpaceBitmap { } } - /** - * Visit the live objects in the range [visit_begin, visit_end). - */ + // Visit the live objects in the range [visit_begin, visit_end). + // TODO: Use lock annotations when clang is fixed. + // EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); template void VisitMarkedRange(uintptr_t visit_begin, uintptr_t visit_end, const Visitor& visitor) const - EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + NO_THREAD_SAFETY_ANALYSIS; // Visits set bits in address order. The callback is not permitted to change the bitmap bits or // max during the traversal. -- 2.11.0