diff options
Diffstat (limited to 'runtime/class_table-inl.h')
-rw-r--r-- | runtime/class_table-inl.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/class_table-inl.h b/runtime/class_table-inl.h index d07ad33d21..d043af36fe 100644 --- a/runtime/class_table-inl.h +++ b/runtime/class_table-inl.h @@ -23,6 +23,7 @@ #include "gc_root-inl.h" #include "mirror/class.h" #include "oat_file.h" +#include "obj_ptr-inl.h" namespace art { @@ -93,7 +94,7 @@ inline bool ClassTable::TableSlot::IsNull() const { } template<ReadBarrierOption kReadBarrierOption> -inline mirror::Class* ClassTable::TableSlot::Read() const { +inline ObjPtr<mirror::Class> ClassTable::TableSlot::Read() const { const uint32_t before = data_.load(std::memory_order_relaxed); const ObjPtr<mirror::Class> before_ptr(ExtractPtr(before)); const ObjPtr<mirror::Class> after_ptr( @@ -103,7 +104,7 @@ inline mirror::Class* ClassTable::TableSlot::Read() const { // one. data_.CompareAndSetStrongRelease(before, Encode(after_ptr, MaskHash(before))); } - return after_ptr.Ptr(); + return after_ptr; } template<typename Visitor> |