Add visibility attributes in runtime/mirror

Bug: 260881207
Test: presubmit
Test: abtd app_compat_drm
Test: abtd app_compat_top_100
Test: abtd app_compat_banking
Change-Id: I6f5eacb96d0ead8144f090624aa99610f78fe57c
diff --git a/runtime/mirror/accessible_object.h b/runtime/mirror/accessible_object.h
index 1e434a1..84e1e88 100644
--- a/runtime/mirror/accessible_object.h
+++ b/runtime/mirror/accessible_object.h
@@ -17,10 +17,11 @@
 #ifndef ART_RUNTIME_MIRROR_ACCESSIBLE_OBJECT_H_
 #define ART_RUNTIME_MIRROR_ACCESSIBLE_OBJECT_H_
 
+#include "base/macros.h"
 #include "object.h"
 #include "read_barrier_option.h"
 
-namespace art {
+namespace art HIDDEN {
 
 namespace mirror {
 
diff --git a/runtime/mirror/array-alloc-inl.h b/runtime/mirror/array-alloc-inl.h
index 32840d4..b905fd1 100644
--- a/runtime/mirror/array-alloc-inl.h
+++ b/runtime/mirror/array-alloc-inl.h
@@ -30,7 +30,7 @@
 #include "obj_ptr-inl.h"
 #include "runtime.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 static inline size_t ComputeArraySize(int32_t component_count, size_t component_size_shift) {
diff --git a/runtime/mirror/array-inl.h b/runtime/mirror/array-inl.h
index 8f81ae5..579b153 100644
--- a/runtime/mirror/array-inl.h
+++ b/runtime/mirror/array-inl.h
@@ -28,7 +28,7 @@
 #include "runtime.h"
 #include "thread-current-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline uint32_t Array::ClassSize(PointerSize pointer_size) {
diff --git a/runtime/mirror/array.cc b/runtime/mirror/array.cc
index 7b61b86..a4f6c88 100644
--- a/runtime/mirror/array.cc
+++ b/runtime/mirror/array.cc
@@ -31,7 +31,7 @@
 #include "object_array-inl.h"
 #include "thread.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 using android::base::StringPrintf;
diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h
index e7cfb92..b8724cc 100644
--- a/runtime/mirror/array.h
+++ b/runtime/mirror/array.h
@@ -19,10 +19,11 @@
 
 #include "base/bit_utils.h"
 #include "base/enums.h"
+#include "base/macros.h"
 #include "obj_ptr.h"
 #include "object.h"
 
-namespace art {
+namespace art HIDDEN {
 
 namespace gc {
 enum AllocatorType : char;
@@ -127,15 +128,15 @@
   template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
   ALWAYS_INLINE bool CheckIsValidIndex(int32_t index) REQUIRES_SHARED(Locks::mutator_lock_);
 
-  static ObjPtr<Array> CopyOf(Handle<Array> h_this, Thread* self, int32_t new_length)
+  EXPORT static ObjPtr<Array> CopyOf(Handle<Array> h_this, Thread* self, int32_t new_length)
       REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
 
  protected:
-  void ThrowArrayStoreException(ObjPtr<Object> object) REQUIRES_SHARED(Locks::mutator_lock_)
+  EXPORT void ThrowArrayStoreException(ObjPtr<Object> object) REQUIRES_SHARED(Locks::mutator_lock_)
       REQUIRES(!Roles::uninterruptible_);
 
  private:
-  void ThrowArrayIndexOutOfBoundsException(int32_t index)
+  EXPORT void ThrowArrayIndexOutOfBoundsException(int32_t index)
       REQUIRES_SHARED(Locks::mutator_lock_);
 
   // The number of array elements.
@@ -162,13 +163,14 @@
 
   using ElementType = T;
 
-  static ObjPtr<PrimitiveArray<T>> Alloc(Thread* self, size_t length)
+  EXPORT static ObjPtr<PrimitiveArray<T>> Alloc(Thread* self, size_t length)
       REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
 
-  static ObjPtr<PrimitiveArray<T>> AllocateAndFill(Thread* self, const T* data, size_t length)
+  EXPORT static ObjPtr<PrimitiveArray<T>> AllocateAndFill(Thread* self,
+                                                          const T* data,
+                                                          size_t length)
       REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
 
-
   const T* GetData() const ALWAYS_INLINE  REQUIRES_SHARED(Locks::mutator_lock_) {
     return reinterpret_cast<const T*>(GetRawData<sizeof(T)>(0));
   }
@@ -211,7 +213,7 @@
    * smaller than element size copies). Arguments are assumed to be within the bounds of the array
    * and the arrays non-null.
    */
-  void Memcpy(int32_t dst_pos, ObjPtr<PrimitiveArray<T>> src, int32_t src_pos, int32_t count)
+  EXPORT void Memcpy(int32_t dst_pos, ObjPtr<PrimitiveArray<T>> src, int32_t src_pos, int32_t count)
       REQUIRES_SHARED(Locks::mutator_lock_);
 
  private:
diff --git a/runtime/mirror/call_site-inl.h b/runtime/mirror/call_site-inl.h
index dbbd4d1..d38d47b 100644
--- a/runtime/mirror/call_site-inl.h
+++ b/runtime/mirror/call_site-inl.h
@@ -21,7 +21,7 @@
 
 #include "object-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline ObjPtr<MethodHandle> CallSite::GetTarget() {
diff --git a/runtime/mirror/call_site.h b/runtime/mirror/call_site.h
index 88387a3..1ec766c 100644
--- a/runtime/mirror/call_site.h
+++ b/runtime/mirror/call_site.h
@@ -17,10 +17,11 @@
 #ifndef ART_RUNTIME_MIRROR_CALL_SITE_H_
 #define ART_RUNTIME_MIRROR_CALL_SITE_H_
 
+#include "base/macros.h"
 #include "mirror/method_handle_impl.h"
 #include "obj_ptr.h"
 
-namespace art {
+namespace art HIDDEN {
 
 struct CallSiteOffsets;
 
diff --git a/runtime/mirror/class-alloc-inl.h b/runtime/mirror/class-alloc-inl.h
index ed3967b..d1dd5db 100644
--- a/runtime/mirror/class-alloc-inl.h
+++ b/runtime/mirror/class-alloc-inl.h
@@ -24,7 +24,7 @@
 #include "object-inl.h"
 #include "runtime.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline void Class::CheckObjectAlloc() {
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h
index e2fd82f..9c58ff6 100644
--- a/runtime/mirror/class-inl.h
+++ b/runtime/mirror/class-inl.h
@@ -42,7 +42,7 @@
 #include "subtype_check.h"
 #include "thread-current-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template<VerifyObjectFlags kVerifyFlags>
diff --git a/runtime/mirror/class-refvisitor-inl.h b/runtime/mirror/class-refvisitor-inl.h
index ee5c11f..21ed1cd 100644
--- a/runtime/mirror/class-refvisitor-inl.h
+++ b/runtime/mirror/class-refvisitor-inl.h
@@ -22,7 +22,7 @@
 #include "art_field-inl.h"
 #include "class_ext-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template <bool kVisitNativeRoots,
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index 296eeed..6e472c5 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -58,7 +58,7 @@
 #include "throwable.h"
 #include "well_known_classes.h"
 
-namespace art {
+namespace art HIDDEN {
 
 namespace mirror {
 
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index 9f74066..15f0fd3 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -30,7 +30,7 @@
 #include "object_array.h"
 #include "read_barrier_option.h"
 
-namespace art {
+namespace art HIDDEN {
 
 namespace dex {
 struct ClassDef;
@@ -82,7 +82,7 @@
 using StringDexCacheType = std::atomic<StringDexCachePair>;
 
 // C++ mirror of java.lang.Class
-class MANAGED Class final : public Object {
+class EXPORT MANAGED Class final : public Object {
  public:
   MIRROR_CLASS("Ljava/lang/Class;");
 
diff --git a/runtime/mirror/class_ext-inl.h b/runtime/mirror/class_ext-inl.h
index 6a62f78..1fba26c 100644
--- a/runtime/mirror/class_ext-inl.h
+++ b/runtime/mirror/class_ext-inl.h
@@ -32,7 +32,7 @@
 #include "object-inl.h"
 #include "verify_object.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template <VerifyObjectFlags kVerifyFlags, ReadBarrierOption kReadBarrierOption>
diff --git a/runtime/mirror/class_ext.cc b/runtime/mirror/class_ext.cc
index 097e0de..4d915f7 100644
--- a/runtime/mirror/class_ext.cc
+++ b/runtime/mirror/class_ext.cc
@@ -33,7 +33,7 @@
 #include "stack_trace_element.h"
 #include "well_known_classes.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 uint32_t ClassExt::ClassSize(PointerSize pointer_size) {
diff --git a/runtime/mirror/class_ext.h b/runtime/mirror/class_ext.h
index b025eb2..302e172 100644
--- a/runtime/mirror/class_ext.h
+++ b/runtime/mirror/class_ext.h
@@ -18,13 +18,14 @@
 #define ART_RUNTIME_MIRROR_CLASS_EXT_H_
 
 #include "array.h"
+#include "base/macros.h"
 #include "class.h"
 #include "dex_cache.h"
 #include "object.h"
 #include "object_array.h"
 #include "string.h"
 
-namespace art {
+namespace art HIDDEN {
 
 struct ClassExtOffsets;
 class DexCacheVisitor;
@@ -104,29 +105,31 @@
 
   // Used to manually initialize the ext-ids arrays for the ClassExt associated
   // with the Class<ClassExt>. This simplifies the id allocation path.
-  void SetIdsArraysForClassExtExtData(ObjPtr<Object> marker) REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT void SetIdsArraysForClassExtExtData(ObjPtr<Object> marker)
+      REQUIRES_SHARED(Locks::mutator_lock_);
 
-  void SetOriginalDexFile(ObjPtr<Object> bytes) REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT void SetOriginalDexFile(ObjPtr<Object> bytes) REQUIRES_SHARED(Locks::mutator_lock_);
 
   uint16_t GetPreRedefineClassDefIndex() REQUIRES_SHARED(Locks::mutator_lock_) {
     return static_cast<uint16_t>(
         GetField32(OFFSET_OF_OBJECT_MEMBER(ClassExt, pre_redefine_class_def_index_)));
   }
 
-  void SetPreRedefineClassDefIndex(uint16_t index) REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT void SetPreRedefineClassDefIndex(uint16_t index) REQUIRES_SHARED(Locks::mutator_lock_);
 
   const DexFile* GetPreRedefineDexFile() REQUIRES_SHARED(Locks::mutator_lock_) {
     return reinterpret_cast<const DexFile*>(static_cast<uintptr_t>(
         GetField64(OFFSET_OF_OBJECT_MEMBER(ClassExt, pre_redefine_dex_file_ptr_))));
   }
 
-  void SetPreRedefineDexFile(const DexFile* dex_file) REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT void SetPreRedefineDexFile(const DexFile* dex_file) REQUIRES_SHARED(Locks::mutator_lock_);
 
-  void SetObsoleteArrays(ObjPtr<PointerArray> methods, ObjPtr<ObjectArray<DexCache>> dex_caches)
+  EXPORT void SetObsoleteArrays(ObjPtr<PointerArray> methods,
+                                ObjPtr<ObjectArray<DexCache>> dex_caches)
       REQUIRES_SHARED(Locks::mutator_lock_);
 
   // Extend the obsolete arrays by the given amount.
-  static bool ExtendObsoleteArrays(Handle<ClassExt> h_this, Thread* self, uint32_t increase)
+  EXPORT static bool ExtendObsoleteArrays(Handle<ClassExt> h_this, Thread* self, uint32_t increase)
       REQUIRES_SHARED(Locks::mutator_lock_);
 
   template<ReadBarrierOption kReadBarrierOption = kWithReadBarrier,
@@ -156,7 +159,7 @@
   template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags,
            ReadBarrierOption kReadBarrierOption = kWithReadBarrier>
   ObjPtr<Class> GetObsoleteClass() REQUIRES_SHARED(Locks::mutator_lock_);
-  void SetObsoleteClass(ObjPtr<Class> classes) REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT void SetObsoleteClass(ObjPtr<Class> classes) REQUIRES_SHARED(Locks::mutator_lock_);
 
   template<ReadBarrierOption kReadBarrierOption = kWithReadBarrier, typename Visitor>
   inline void VisitJFieldIDs(Visitor v) REQUIRES_SHARED(Locks::mutator_lock_);
diff --git a/runtime/mirror/class_flags.h b/runtime/mirror/class_flags.h
index c85b9e0..26a87c9 100644
--- a/runtime/mirror/class_flags.h
+++ b/runtime/mirror/class_flags.h
@@ -19,7 +19,9 @@
 
 #include <stdint.h>
 
-namespace art {
+#include "base/macros.h"
+
+namespace art HIDDEN {
 namespace mirror {
 
 // Normal instance with at least one ref field other than the class.
diff --git a/runtime/mirror/class_loader-inl.h b/runtime/mirror/class_loader-inl.h
index 1c98e0a..00dfdc7 100644
--- a/runtime/mirror/class_loader-inl.h
+++ b/runtime/mirror/class_loader-inl.h
@@ -22,7 +22,7 @@
 #include "class_table-inl.h"
 #include "object-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline ObjPtr<ClassLoader> ClassLoader::GetParent() {
diff --git a/runtime/mirror/class_loader.h b/runtime/mirror/class_loader.h
index 62b258c..0e925f4 100644
--- a/runtime/mirror/class_loader.h
+++ b/runtime/mirror/class_loader.h
@@ -18,12 +18,13 @@
 #define ART_RUNTIME_MIRROR_CLASS_LOADER_H_
 
 #include "base/locks.h"
+#include "base/macros.h"
 #include "obj_ptr.h"
 #include "object.h"
 #include "object_reference.h"
 #include "string.h"
 
-namespace art {
+namespace art HIDDEN {
 
 struct ClassLoaderOffsets;
 class ClassTable;
diff --git a/runtime/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h
index dbc091d..48a41e6 100644
--- a/runtime/mirror/dex_cache-inl.h
+++ b/runtime/mirror/dex_cache-inl.h
@@ -40,7 +40,7 @@
 
 #include <atomic>
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template<typename DexCachePair>
diff --git a/runtime/mirror/dex_cache.cc b/runtime/mirror/dex_cache.cc
index 3b88766..b981f08 100644
--- a/runtime/mirror/dex_cache.cc
+++ b/runtime/mirror/dex_cache.cc
@@ -33,7 +33,7 @@
 #include "thread.h"
 #include "write_barrier.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 // Whether to allocate full dex cache arrays during startup. Currently disabled
diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h
index 2b5aa8e..921d802 100644
--- a/runtime/mirror/dex_cache.h
+++ b/runtime/mirror/dex_cache.h
@@ -22,6 +22,7 @@
 #include "base/atomic_pair.h"
 #include "base/bit_utils.h"
 #include "base/locks.h"
+#include "base/macros.h"
 #include "dex/dex_file.h"
 #include "dex/dex_file_types.h"
 #include "gc_root.h"  // Note: must not use -inl here to avoid circular dependency.
@@ -29,7 +30,7 @@
 #include "object.h"
 #include "object_array.h"
 
-namespace art {
+namespace art HIDDEN {
 
 namespace linker {
 class ImageWriter;
@@ -300,13 +301,12 @@
                                      DexCachePair<Object>* pairs_end)
       REQUIRES_SHARED(Locks::mutator_lock_);
 
-  void Initialize(const DexFile* dex_file, ObjPtr<ClassLoader> class_loader)
-      REQUIRES_SHARED(Locks::mutator_lock_)
-      REQUIRES(Locks::dex_lock_);
+  EXPORT void Initialize(const DexFile* dex_file, ObjPtr<ClassLoader> class_loader)
+      REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(Locks::dex_lock_);
 
   // Zero all array references.
   // WARNING: This does not free the memory since it is in LinearAlloc.
-  void ResetNativeArrays() REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT void ResetNativeArrays() REQUIRES_SHARED(Locks::mutator_lock_);
 
   template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags,
            ReadBarrierOption kReadBarrierOption = kWithReadBarrier>
@@ -368,7 +368,7 @@
     SetFieldPtr<false>(OFFSET_OF_OBJECT_MEMBER(DexCache, dex_file_), dex_file);
   }
 
-  void SetLocation(ObjPtr<String> location) REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT void SetLocation(ObjPtr<String> location) REQUIRES_SHARED(Locks::mutator_lock_);
 
   void VisitReflectiveTargets(ReflectiveValueVisitor* visitor) REQUIRES(Locks::mutator_lock_);
 
diff --git a/runtime/mirror/dex_cache_test.cc b/runtime/mirror/dex_cache_test.cc
index bc521f5..9ca8d30 100644
--- a/runtime/mirror/dex_cache_test.cc
+++ b/runtime/mirror/dex_cache_test.cc
@@ -27,7 +27,7 @@
 #include "mirror/dex_cache-inl.h"
 #include "scoped_thread_state_change-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 class DexCacheTest : public CommonRuntimeTest {
diff --git a/runtime/mirror/emulated_stack_frame-inl.h b/runtime/mirror/emulated_stack_frame-inl.h
index 8dc4c70..58c1064 100644
--- a/runtime/mirror/emulated_stack_frame-inl.h
+++ b/runtime/mirror/emulated_stack_frame-inl.h
@@ -23,7 +23,7 @@
 #include "object-inl.h"
 #include "object_array-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline ObjPtr<mirror::MethodType> EmulatedStackFrame::GetType() {
diff --git a/runtime/mirror/emulated_stack_frame.cc b/runtime/mirror/emulated_stack_frame.cc
index 4bae657..a4fde72 100644
--- a/runtime/mirror/emulated_stack_frame.cc
+++ b/runtime/mirror/emulated_stack_frame.cc
@@ -29,7 +29,7 @@
 #include "object_array-inl.h"
 #include "reflection-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 // Calculates the size of a stack frame based on the size of its argument
diff --git a/runtime/mirror/emulated_stack_frame.h b/runtime/mirror/emulated_stack_frame.h
index 590f653..93c543c 100644
--- a/runtime/mirror/emulated_stack_frame.h
+++ b/runtime/mirror/emulated_stack_frame.h
@@ -18,12 +18,13 @@
 #define ART_RUNTIME_MIRROR_EMULATED_STACK_FRAME_H_
 
 #include "base/utils.h"
+#include "base/macros.h"
 #include "dex/dex_instruction.h"
 #include "handle.h"
 #include "object.h"
 #include "stack.h"
 
-namespace art {
+namespace art HIDDEN {
 
 struct EmulatedStackFrameOffsets;
 
diff --git a/runtime/mirror/executable-inl.h b/runtime/mirror/executable-inl.h
index 77669da..fa4fa64 100644
--- a/runtime/mirror/executable-inl.h
+++ b/runtime/mirror/executable-inl.h
@@ -23,7 +23,7 @@
 #include "reflective_value_visitor.h"
 #include "verify_object.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template <bool kTransactionActive,
diff --git a/runtime/mirror/executable.cc b/runtime/mirror/executable.cc
index 3996f49..96b633a 100644
--- a/runtime/mirror/executable.cc
+++ b/runtime/mirror/executable.cc
@@ -19,7 +19,7 @@
 #include "art_method-inl.h"
 #include "object-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template <PointerSize kPointerSize>
diff --git a/runtime/mirror/executable.h b/runtime/mirror/executable.h
index 079efc3..241fea3 100644
--- a/runtime/mirror/executable.h
+++ b/runtime/mirror/executable.h
@@ -18,10 +18,11 @@
 #define ART_RUNTIME_MIRROR_EXECUTABLE_H_
 
 #include "accessible_object.h"
+#include "base/macros.h"
 #include "object.h"
 #include "read_barrier_option.h"
 
-namespace art {
+namespace art HIDDEN {
 
 struct ExecutableOffsets;
 class ArtMethod;
diff --git a/runtime/mirror/field-inl.h b/runtime/mirror/field-inl.h
index f1f8b25..d47e8c6 100644
--- a/runtime/mirror/field-inl.h
+++ b/runtime/mirror/field-inl.h
@@ -24,7 +24,7 @@
 #include "class_root-inl.h"
 #include "object-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 
 namespace mirror {
 
diff --git a/runtime/mirror/field.cc b/runtime/mirror/field.cc
index 7faa55c..5ad59fa 100644
--- a/runtime/mirror/field.cc
+++ b/runtime/mirror/field.cc
@@ -22,7 +22,7 @@
 #include "object_array-inl.h"
 #include "write_barrier.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 void Field::VisitTarget(ReflectiveValueVisitor* v) {
diff --git a/runtime/mirror/field.h b/runtime/mirror/field.h
index bbae8ce..dc5e911 100644
--- a/runtime/mirror/field.h
+++ b/runtime/mirror/field.h
@@ -19,13 +19,14 @@
 
 #include "accessible_object.h"
 #include "base/enums.h"
+#include "base/macros.h"
 #include "dex/modifiers.h"
 #include "dex/primitive.h"
 #include "obj_ptr.h"
 #include "object.h"
 #include "read_barrier_option.h"
 
-namespace art {
+namespace art HIDDEN {
 
 class ArtField;
 struct FieldOffsets;
diff --git a/runtime/mirror/iftable-inl.h b/runtime/mirror/iftable-inl.h
index ce9d3f8..631f74f 100644
--- a/runtime/mirror/iftable-inl.h
+++ b/runtime/mirror/iftable-inl.h
@@ -21,7 +21,7 @@
 #include "obj_ptr-inl.h"
 #include "object_array-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template<VerifyObjectFlags kVerifyFlags,
diff --git a/runtime/mirror/iftable.h b/runtime/mirror/iftable.h
index 30fed56..09fdea8 100644
--- a/runtime/mirror/iftable.h
+++ b/runtime/mirror/iftable.h
@@ -18,9 +18,10 @@
 #define ART_RUNTIME_MIRROR_IFTABLE_H_
 
 #include "base/casts.h"
+#include "base/macros.h"
 #include "object_array.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 class MANAGED IfTable final : public ObjectArray<Object> {
diff --git a/runtime/mirror/method.cc b/runtime/mirror/method.cc
index f83f03c..2511941 100644
--- a/runtime/mirror/method.cc
+++ b/runtime/mirror/method.cc
@@ -22,7 +22,7 @@
 #include "mirror/object-inl.h"
 #include "obj_ptr-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template <PointerSize kPointerSize>
diff --git a/runtime/mirror/method.h b/runtime/mirror/method.h
index 4b8dcff..e72ffc9 100644
--- a/runtime/mirror/method.h
+++ b/runtime/mirror/method.h
@@ -17,9 +17,10 @@
 #ifndef ART_RUNTIME_MIRROR_METHOD_H_
 #define ART_RUNTIME_MIRROR_METHOD_H_
 
+#include "base/macros.h"
 #include "executable.h"
 
-namespace art {
+namespace art HIDDEN {
 
 template<class MirrorType> class ObjPtr;
 
diff --git a/runtime/mirror/method_handle_impl-inl.h b/runtime/mirror/method_handle_impl-inl.h
index 8c5e479..54ce8bd 100644
--- a/runtime/mirror/method_handle_impl-inl.h
+++ b/runtime/mirror/method_handle_impl-inl.h
@@ -22,7 +22,7 @@
 #include "art_method-inl.h"
 #include "object-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline MethodHandle::Kind MethodHandle::GetHandleKind() REQUIRES_SHARED(Locks::mutator_lock_) {
diff --git a/runtime/mirror/method_handle_impl.cc b/runtime/mirror/method_handle_impl.cc
index 79ed2b0..0a37f95 100644
--- a/runtime/mirror/method_handle_impl.cc
+++ b/runtime/mirror/method_handle_impl.cc
@@ -19,7 +19,7 @@
 #include "class-alloc-inl.h"
 #include "class_root-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 const char* MethodHandle::GetReturnTypeDescriptor(const char* invoke_method_name) {
diff --git a/runtime/mirror/method_handle_impl.h b/runtime/mirror/method_handle_impl.h
index ef354a9..ba1763a 100644
--- a/runtime/mirror/method_handle_impl.h
+++ b/runtime/mirror/method_handle_impl.h
@@ -19,12 +19,13 @@
 
 #include "art_field.h"
 #include "art_method.h"
+#include "base/macros.h"
 #include "class.h"
 #include "method_type.h"
 #include "obj_ptr.h"
 #include "object.h"
 
-namespace art {
+namespace art HIDDEN {
 
 struct MethodHandleOffsets;
 struct MethodHandleImplOffsets;
@@ -117,10 +118,10 @@
  public:
   MIRROR_CLASS("Ljava/lang/invoke/MethodHandleImpl;");
 
-  static ObjPtr<mirror::MethodHandleImpl> Create(Thread* const self,
-                                                 uintptr_t art_field_or_method,
-                                                 MethodHandle::Kind kind,
-                                                 Handle<MethodType> method_type)
+  EXPORT static ObjPtr<mirror::MethodHandleImpl> Create(Thread* const self,
+                                                        uintptr_t art_field_or_method,
+                                                        MethodHandle::Kind kind,
+                                                        Handle<MethodType> method_type)
       REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
 
  private:
diff --git a/runtime/mirror/method_handles_lookup.cc b/runtime/mirror/method_handles_lookup.cc
index 62c35df..702588c 100644
--- a/runtime/mirror/method_handles_lookup.cc
+++ b/runtime/mirror/method_handles_lookup.cc
@@ -25,7 +25,7 @@
 #include "object-inl.h"
 #include "well_known_classes.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 ObjPtr<MethodHandlesLookup> MethodHandlesLookup::Create(Thread* const self,
diff --git a/runtime/mirror/method_handles_lookup.h b/runtime/mirror/method_handles_lookup.h
index 3ed150a..9ee9dbe 100644
--- a/runtime/mirror/method_handles_lookup.h
+++ b/runtime/mirror/method_handles_lookup.h
@@ -18,11 +18,12 @@
 #define ART_RUNTIME_MIRROR_METHOD_HANDLES_LOOKUP_H_
 
 #include "base/utils.h"
+#include "base/macros.h"
 #include "handle.h"
 #include "obj_ptr.h"
 #include "object.h"
 
-namespace art {
+namespace art HIDDEN {
 
 struct MethodHandlesLookupOffsets;
 class RootVisitor;
diff --git a/runtime/mirror/method_type-inl.h b/runtime/mirror/method_type-inl.h
index fca87fe..d7b8647 100644
--- a/runtime/mirror/method_type-inl.h
+++ b/runtime/mirror/method_type-inl.h
@@ -23,7 +23,7 @@
 #include "handle_scope-inl.h"
 #include "mirror/object-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline RawMethodType::RawMethodType(VariableSizedHandleScope* hs)
diff --git a/runtime/mirror/method_type.cc b/runtime/mirror/method_type.cc
index bd4b1db..a3785c1 100644
--- a/runtime/mirror/method_type.cc
+++ b/runtime/mirror/method_type.cc
@@ -25,7 +25,7 @@
 #include "object_array-inl.h"
 #include "well_known_classes.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 namespace {
diff --git a/runtime/mirror/method_type.h b/runtime/mirror/method_type.h
index bbb4a47..1efc0c5 100644
--- a/runtime/mirror/method_type.h
+++ b/runtime/mirror/method_type.h
@@ -17,11 +17,12 @@
 #ifndef ART_RUNTIME_MIRROR_METHOD_TYPE_H_
 #define ART_RUNTIME_MIRROR_METHOD_TYPE_H_
 
+#include "base/macros.h"
 #include "object_array.h"
 #include "object.h"
 #include "string.h"
 
-namespace art {
+namespace art HIDDEN {
 
 struct MethodTypeOffsets;
 class VariableSizedHandleScope;
@@ -54,9 +55,9 @@
  public:
   MIRROR_CLASS("Ljava/lang/invoke/MethodType;");
 
-  static ObjPtr<MethodType> Create(Thread* self,
-                                   Handle<Class> return_type,
-                                   Handle<ObjectArray<Class>> param_types)
+  EXPORT static ObjPtr<MethodType> Create(Thread* self,
+                                          Handle<Class> return_type,
+                                          Handle<ObjectArray<Class>> param_types)
       REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
 
   // Create a `MethodType` from a `RawMethodType`.
diff --git a/runtime/mirror/method_type_test.cc b/runtime/mirror/method_type_test.cc
index c9d7e91..9d23f8f 100644
--- a/runtime/mirror/method_type_test.cc
+++ b/runtime/mirror/method_type_test.cc
@@ -29,7 +29,7 @@
 #include "object_array-inl.h"
 #include "scoped_thread_state_change-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 class MethodTypeTest : public CommonRuntimeTest {};
diff --git a/runtime/mirror/object-inl.h b/runtime/mirror/object-inl.h
index 318a811..60b8a05 100644
--- a/runtime/mirror/object-inl.h
+++ b/runtime/mirror/object-inl.h
@@ -41,7 +41,7 @@
 #include "throwable.h"
 #include "write_barrier-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline uint32_t Object::ClassSize(PointerSize pointer_size) {
diff --git a/runtime/mirror/object-readbarrier-inl.h b/runtime/mirror/object-readbarrier-inl.h
index 2895009..15179b9 100644
--- a/runtime/mirror/object-readbarrier-inl.h
+++ b/runtime/mirror/object-readbarrier-inl.h
@@ -26,7 +26,7 @@
 #include "read_barrier.h"
 #include "runtime.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template<VerifyObjectFlags kVerifyFlags>
diff --git a/runtime/mirror/object-refvisitor-inl.h b/runtime/mirror/object-refvisitor-inl.h
index de60c8e..fa2fbae 100644
--- a/runtime/mirror/object-refvisitor-inl.h
+++ b/runtime/mirror/object-refvisitor-inl.h
@@ -23,7 +23,7 @@
 #include "class_loader-inl.h"
 #include "dex_cache-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template <VerifyObjectFlags kVerifyFlags,
diff --git a/runtime/mirror/object.cc b/runtime/mirror/object.cc
index 995f06e..b289786 100644
--- a/runtime/mirror/object.cc
+++ b/runtime/mirror/object.cc
@@ -38,7 +38,7 @@
 #include "throwable.h"
 #include "well_known_classes.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 Atomic<uint32_t> Object::hash_code_seed(987654321U + std::time(nullptr));
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index ecd8a48..f0b6a03 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -20,6 +20,7 @@
 #include "base/atomic.h"
 #include "base/casts.h"
 #include "base/enums.h"
+#include "base/macros.h"
 #include "dex/primitive.h"
 #include "obj_ptr.h"
 #include "object_reference.h"
@@ -29,7 +30,7 @@
 #include "runtime_globals.h"
 #include "verify_object.h"
 
-namespace art {
+namespace art HIDDEN {
 
 class ArtField;
 class ArtMethod;
@@ -74,7 +75,7 @@
 static constexpr uint32_t kObjectHeaderSize = 8;
 
 // C++ mirror of java.lang.Object
-class MANAGED LOCKABLE Object {
+class EXPORT MANAGED LOCKABLE Object {
  public:
   MIRROR_CLASS("Ljava/lang/Object;");
 
diff --git a/runtime/mirror/object_array-alloc-inl.h b/runtime/mirror/object_array-alloc-inl.h
index 594b0a6..e79d154 100644
--- a/runtime/mirror/object_array-alloc-inl.h
+++ b/runtime/mirror/object_array-alloc-inl.h
@@ -29,7 +29,7 @@
 #include "object-inl.h"
 #include "runtime.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template<class T>
diff --git a/runtime/mirror/object_array-inl.h b/runtime/mirror/object_array-inl.h
index 87f24eb..b0ca6c2 100644
--- a/runtime/mirror/object_array-inl.h
+++ b/runtime/mirror/object_array-inl.h
@@ -33,7 +33,7 @@
 #include "thread-current-inl.h"
 #include "write_barrier-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template<class T> template<VerifyObjectFlags kVerifyFlags, ReadBarrierOption kReadBarrierOption>
diff --git a/runtime/mirror/object_array.h b/runtime/mirror/object_array.h
index c6b1e01..de12e65 100644
--- a/runtime/mirror/object_array.h
+++ b/runtime/mirror/object_array.h
@@ -20,9 +20,10 @@
 #include <iterator>
 #include "array.h"
 #include "base/iteration_range.h"
+#include "base/macros.h"
 #include "obj_ptr.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template<typename T, typename Container> class ArrayIter;
diff --git a/runtime/mirror/object_reference-inl.h b/runtime/mirror/object_reference-inl.h
index 183a5af..8f793b4 100644
--- a/runtime/mirror/object_reference-inl.h
+++ b/runtime/mirror/object_reference-inl.h
@@ -21,7 +21,7 @@
 
 #include "obj_ptr-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 template<bool kPoisonReferences, class MirrorType>
diff --git a/runtime/mirror/object_reference.h b/runtime/mirror/object_reference.h
index 251bcfd..177b968 100644
--- a/runtime/mirror/object_reference.h
+++ b/runtime/mirror/object_reference.h
@@ -23,11 +23,12 @@
 #include "base/atomic.h"
 #include "base/casts.h"
 #include "base/locks.h"  // For Locks::mutator_lock_.
+#include "base/macros.h"
 #include "heap_poisoning.h"
 #include "obj_ptr.h"
 #include "runtime_globals.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 class Object;
diff --git a/runtime/mirror/object_test.cc b/runtime/mirror/object_test.cc
index 6f42c5b..88b9924 100644
--- a/runtime/mirror/object_test.cc
+++ b/runtime/mirror/object_test.cc
@@ -45,7 +45,7 @@
 #include "scoped_thread_state_change-inl.h"
 #include "string-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 class ObjectTest : public CommonRuntimeTest {
diff --git a/runtime/mirror/proxy.h b/runtime/mirror/proxy.h
index 3291669..996c218 100644
--- a/runtime/mirror/proxy.h
+++ b/runtime/mirror/proxy.h
@@ -17,9 +17,10 @@
 #ifndef ART_RUNTIME_MIRROR_PROXY_H_
 #define ART_RUNTIME_MIRROR_PROXY_H_
 
+#include "base/macros.h"
 #include "object.h"
 
-namespace art {
+namespace art HIDDEN {
 
 struct ProxyOffsets;
 
diff --git a/runtime/mirror/reference-inl.h b/runtime/mirror/reference-inl.h
index f8de6e6..c8a0957 100644
--- a/runtime/mirror/reference-inl.h
+++ b/runtime/mirror/reference-inl.h
@@ -22,7 +22,7 @@
 #include "obj_ptr-inl.h"
 #include "runtime.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline uint32_t Reference::ClassSize(PointerSize pointer_size) {
diff --git a/runtime/mirror/reference.h b/runtime/mirror/reference.h
index ef6d273..9df0fb3 100644
--- a/runtime/mirror/reference.h
+++ b/runtime/mirror/reference.h
@@ -24,7 +24,7 @@
 #include "object.h"
 #include "read_barrier_option.h"
 
-namespace art {
+namespace art HIDDEN {
 
 namespace gc {
 
diff --git a/runtime/mirror/stack_frame_info.cc b/runtime/mirror/stack_frame_info.cc
index dd3e8f7..f15783a 100644
--- a/runtime/mirror/stack_frame_info.cc
+++ b/runtime/mirror/stack_frame_info.cc
@@ -24,7 +24,7 @@
 #include "object-inl.h"
 #include "string.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 void StackFrameInfo::AssignFields(Handle<Class> declaring_class,
diff --git a/runtime/mirror/stack_frame_info.h b/runtime/mirror/stack_frame_info.h
index 07f87c5..b9b1519 100644
--- a/runtime/mirror/stack_frame_info.h
+++ b/runtime/mirror/stack_frame_info.h
@@ -17,11 +17,12 @@
 #ifndef ART_RUNTIME_MIRROR_STACK_FRAME_INFO_H_
 #define ART_RUNTIME_MIRROR_STACK_FRAME_INFO_H_
 
+#include "base/macros.h"
 #include "method_type.h"
 #include "object.h"
 #include "stack_trace_element.h"
 
-namespace art {
+namespace art HIDDEN {
 
 template<class T> class Handle;
 struct StackFrameInfoOffsets;
diff --git a/runtime/mirror/stack_trace_element-inl.h b/runtime/mirror/stack_trace_element-inl.h
index 0ce6866..182793d 100644
--- a/runtime/mirror/stack_trace_element-inl.h
+++ b/runtime/mirror/stack_trace_element-inl.h
@@ -21,7 +21,7 @@
 
 #include "object-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline ObjPtr<String> StackTraceElement::GetDeclaringClass() {
diff --git a/runtime/mirror/stack_trace_element.cc b/runtime/mirror/stack_trace_element.cc
index 7fc6c09..180e0cd 100644
--- a/runtime/mirror/stack_trace_element.cc
+++ b/runtime/mirror/stack_trace_element.cc
@@ -24,7 +24,7 @@
 #include "object-inl.h"
 #include "string.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 ObjPtr<StackTraceElement> StackTraceElement::Alloc(Thread* self,
diff --git a/runtime/mirror/stack_trace_element.h b/runtime/mirror/stack_trace_element.h
index c07e63d..e203c3b 100644
--- a/runtime/mirror/stack_trace_element.h
+++ b/runtime/mirror/stack_trace_element.h
@@ -17,9 +17,10 @@
 #ifndef ART_RUNTIME_MIRROR_STACK_TRACE_ELEMENT_H_
 #define ART_RUNTIME_MIRROR_STACK_TRACE_ELEMENT_H_
 
+#include "base/macros.h"
 #include "object.h"
 
-namespace art {
+namespace art HIDDEN {
 
 template<class T> class Handle;
 struct StackTraceElementOffsets;
diff --git a/runtime/mirror/string-alloc-inl.h b/runtime/mirror/string-alloc-inl.h
index 9c2529c..944dea0 100644
--- a/runtime/mirror/string-alloc-inl.h
+++ b/runtime/mirror/string-alloc-inl.h
@@ -32,7 +32,7 @@
 #include "runtime_globals.h"
 #include "thread.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 // Sets string count in the allocation code path to ensure it is guarded by a CAS.
diff --git a/runtime/mirror/string-inl.h b/runtime/mirror/string-inl.h
index 72cd6c0..c76ef69 100644
--- a/runtime/mirror/string-inl.h
+++ b/runtime/mirror/string-inl.h
@@ -25,7 +25,7 @@
 #include "dex/utf.h"
 #include "runtime_globals.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 inline uint32_t String::ClassSize(PointerSize pointer_size) {
diff --git a/runtime/mirror/string.cc b/runtime/mirror/string.cc
index 2a26d50..f4d13ab 100644
--- a/runtime/mirror/string.cc
+++ b/runtime/mirror/string.cc
@@ -32,7 +32,7 @@
 #include "string-inl.h"
 #include "thread.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 int32_t String::FastIndexOf(int32_t ch, int32_t start) {
diff --git a/runtime/mirror/string.h b/runtime/mirror/string.h
index c0f9b39..62890f5 100644
--- a/runtime/mirror/string.h
+++ b/runtime/mirror/string.h
@@ -18,11 +18,12 @@
 #define ART_RUNTIME_MIRROR_STRING_H_
 
 #include "base/bit_utils.h"
+#include "base/macros.h"
 #include "class.h"
 #include "object.h"
 #include "runtime_globals.h"
 
-namespace art {
+namespace art HIDDEN {
 
 namespace gc {
 enum AllocatorType : char;
@@ -123,7 +124,7 @@
   static ObjPtr<String> DoReplace(Thread* self, Handle<String> src, uint16_t old_c, uint16_t new_c)
       REQUIRES_SHARED(Locks::mutator_lock_);
 
-  ObjPtr<String> Intern() REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT ObjPtr<String> Intern() REQUIRES_SHARED(Locks::mutator_lock_);
 
   template <bool kIsInstrumented = true, typename PreFenceVisitor>
   ALWAYS_INLINE static ObjPtr<String> Alloc(Thread* self,
@@ -181,7 +182,7 @@
                                        const uint16_t* utf16_data_in)
       REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
 
-  static ObjPtr<String> AllocFromModifiedUtf8(Thread* self, const char* utf)
+  EXPORT static ObjPtr<String> AllocFromModifiedUtf8(Thread* self, const char* utf)
       REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
 
   static ObjPtr<String> AllocFromModifiedUtf8(Thread* self,
@@ -204,10 +205,10 @@
   // A version that takes a mirror::String pointer instead of ObjPtr as it's being
   // called by the runtime app image code which can encode mirror::String at 64bit
   // addresses (ObjPtr only works with 32bit pointers).
-  bool Equals(mirror::String* that) REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT bool Equals(mirror::String* that) REQUIRES_SHARED(Locks::mutator_lock_);
 
   // Create a modified UTF-8 encoded std::string from a java/lang/String object.
-  std::string ToModifiedUtf8() REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT std::string ToModifiedUtf8() REQUIRES_SHARED(Locks::mutator_lock_);
 
   int32_t FastIndexOf(int32_t ch, int32_t start) REQUIRES_SHARED(Locks::mutator_lock_);
 
@@ -289,7 +290,7 @@
   static bool AllASCIIExcept(const uint16_t* chars, int32_t length, uint16_t non_ascii);
 
   // Computes, stores, and returns the hash code.
-  int32_t ComputeAndSetHashCode() REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT int32_t ComputeAndSetHashCode() REQUIRES_SHARED(Locks::mutator_lock_);
 
   void SetHashCode(int32_t new_hash_code) REQUIRES_SHARED(Locks::mutator_lock_) {
     if (kIsDebugBuild) {
diff --git a/runtime/mirror/throwable.cc b/runtime/mirror/throwable.cc
index a38ba1c..94567ef 100644
--- a/runtime/mirror/throwable.cc
+++ b/runtime/mirror/throwable.cc
@@ -33,7 +33,7 @@
 #include "string.h"
 #include "well_known_classes-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 using android::base::StringPrintf;
diff --git a/runtime/mirror/throwable.h b/runtime/mirror/throwable.h
index 995b04a..fa5ead3 100644
--- a/runtime/mirror/throwable.h
+++ b/runtime/mirror/throwable.h
@@ -19,7 +19,7 @@
 
 #include "object.h"
 
-namespace art {
+namespace art HIDDEN {
 
 class RootVisitor;
 struct ThrowableOffsets;
@@ -37,7 +37,7 @@
 
   ObjPtr<String> GetDetailMessage() REQUIRES_SHARED(Locks::mutator_lock_);
 
-  std::string Dump() REQUIRES_SHARED(Locks::mutator_lock_);
+  EXPORT std::string Dump() REQUIRES_SHARED(Locks::mutator_lock_);
 
   // This is a runtime version of initCause, you shouldn't use it if initCause may have been
   // overridden. Also it asserts rather than throwing exceptions. Currently this is only used
diff --git a/runtime/mirror/var_handle.cc b/runtime/mirror/var_handle.cc
index c923075..a623e42 100644
--- a/runtime/mirror/var_handle.cc
+++ b/runtime/mirror/var_handle.cc
@@ -31,7 +31,7 @@
 #include "obj_ptr-inl.h"
 #include "well_known_classes.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 static constexpr bool kTransactionActive = true;
diff --git a/runtime/mirror/var_handle.h b/runtime/mirror/var_handle.h
index 1419bd0..bf9329f 100644
--- a/runtime/mirror/var_handle.h
+++ b/runtime/mirror/var_handle.h
@@ -22,7 +22,7 @@
 #include "jvalue.h"
 #include "object.h"
 
-namespace art {
+namespace art HIDDEN {
 
 template<class T> class Handle;
 class InstructionOperands;
diff --git a/runtime/mirror/var_handle_test.cc b/runtime/mirror/var_handle_test.cc
index 859e86c..22d1e4a 100644
--- a/runtime/mirror/var_handle_test.cc
+++ b/runtime/mirror/var_handle_test.cc
@@ -34,7 +34,7 @@
 #include "reflection.h"
 #include "scoped_thread_state_change-inl.h"
 
-namespace art {
+namespace art HIDDEN {
 namespace mirror {
 
 // Tests for mirror::VarHandle and it's descendents.