diff options
author | Dmitrii Ishcheikin <ishcheikin@google.com> | 2024-01-17 12:01:01 +0000 |
---|---|---|
committer | Dmitrii Ishcheikin <ishcheikin@google.com> | 2024-01-18 13:01:51 +0000 |
commit | 91d4f8cf500a37374cb45151756a476cefa8031f (patch) | |
tree | d16aced73dbf9d1c4d4f8dc66bd4e33d64bc137f | |
parent | af043ec9177fe7b181cb9d5f8cb5b86c79b454f2 (diff) | |
download | art-91d4f8cf500a37374cb45151756a476cefa8031f.tar.gz |
Add visibility attributes in runtime/a*
Bug: 260881207
Test: presubmit
Test: abtd app_compat_drm
Test: abtd app_compat_top_100
Test: abtd app_compat_banking
Change-Id: Iacec568941c5baee57088e67ed410ba18f6abff2
-rw-r--r-- | runtime/aot_class_linker.cc | 2 | ||||
-rw-r--r-- | runtime/aot_class_linker.h | 7 | ||||
-rw-r--r-- | runtime/app_info.cc | 2 | ||||
-rw-r--r-- | runtime/app_info.h | 3 | ||||
-rw-r--r-- | runtime/app_info_test.cc | 2 | ||||
-rw-r--r-- | runtime/art_field-inl.h | 2 | ||||
-rw-r--r-- | runtime/art_field.cc | 2 | ||||
-rw-r--r-- | runtime/art_field.h | 5 | ||||
-rw-r--r-- | runtime/art_method-alloc-inl.h | 2 | ||||
-rw-r--r-- | runtime/art_method-inl.h | 2 | ||||
-rw-r--r-- | runtime/art_method.cc | 2 | ||||
-rw-r--r-- | runtime/art_method.h | 4 | ||||
-rw-r--r-- | runtime/art_method_test.cc | 2 |
13 files changed, 20 insertions, 17 deletions
diff --git a/runtime/aot_class_linker.cc b/runtime/aot_class_linker.cc index 9b2e8767ef..dfdc3d73c5 100644 --- a/runtime/aot_class_linker.cc +++ b/runtime/aot_class_linker.cc @@ -25,7 +25,7 @@ #include "runtime.h" #include "verifier/verifier_enums.h" -namespace art { +namespace art HIDDEN { AotClassLinker::AotClassLinker(InternTable* intern_table) : ClassLinker(intern_table, /*fast_class_not_found_exceptions=*/ false) {} diff --git a/runtime/aot_class_linker.h b/runtime/aot_class_linker.h index be4ab2b938..1cf91636bb 100644 --- a/runtime/aot_class_linker.h +++ b/runtime/aot_class_linker.h @@ -17,10 +17,11 @@ #ifndef ART_RUNTIME_AOT_CLASS_LINKER_H_ #define ART_RUNTIME_AOT_CLASS_LINKER_H_ +#include "base/macros.h" #include "sdk_checker.h" #include "class_linker.h" -namespace art { +namespace art HIDDEN { namespace gc { class Heap; @@ -33,10 +34,10 @@ class AotClassLinker : public ClassLinker { explicit AotClassLinker(InternTable *intern_table); ~AotClassLinker(); -static bool CanReferenceInBootImageExtension(ObjPtr<mirror::Class> klass, gc::Heap* heap) + EXPORT static bool CanReferenceInBootImageExtension(ObjPtr<mirror::Class> klass, gc::Heap* heap) REQUIRES_SHARED(Locks::mutator_lock_); - void SetSdkChecker(std::unique_ptr<SdkChecker>&& sdk_checker_); + EXPORT void SetSdkChecker(std::unique_ptr<SdkChecker>&& sdk_checker_); const SdkChecker* GetSdkChecker() const; bool DenyAccessBasedOnPublicSdk([[maybe_unused]] ArtMethod* art_method) const override diff --git a/runtime/app_info.cc b/runtime/app_info.cc index 3fef5651b0..5ec57c7660 100644 --- a/runtime/app_info.cc +++ b/runtime/app_info.cc @@ -21,7 +21,7 @@ #include "base/safe_map.h" #include "thread-inl.h" -namespace art { +namespace art HIDDEN { static constexpr const char* kUnknownValue = "unknown"; diff --git a/runtime/app_info.h b/runtime/app_info.h index 0b8132aa6f..20cec94a78 100644 --- a/runtime/app_info.h +++ b/runtime/app_info.h @@ -19,10 +19,11 @@ #include <vector> +#include "base/macros.h" #include "base/mutex.h" #include <base/safe_map.h> -namespace art { +namespace art HIDDEN { // Constants used by VMRuntime.java to interface with the runtime. // We could get them from the well known class but it's simpler to diff --git a/runtime/app_info_test.cc b/runtime/app_info_test.cc index 51dd42f6fb..39d07aa516 100644 --- a/runtime/app_info_test.cc +++ b/runtime/app_info_test.cc @@ -20,7 +20,7 @@ #include "gtest/gtest.h" -namespace art { +namespace art HIDDEN { TEST(AppInfoTest, RegisterAppInfo) { AppInfo app_info; diff --git a/runtime/art_field-inl.h b/runtime/art_field-inl.h index 43f2831f99..7137658387 100644 --- a/runtime/art_field-inl.h +++ b/runtime/art_field-inl.h @@ -32,7 +32,7 @@ #include "obj_ptr-inl.h" #include "thread-current-inl.h" -namespace art { +namespace art HIDDEN { inline bool ArtField::IsProxyField() { // No read barrier needed, we're reading the constant declaring class only to read diff --git a/runtime/art_field.cc b/runtime/art_field.cc index c248bf73a1..dcfd7582fe 100644 --- a/runtime/art_field.cc +++ b/runtime/art_field.cc @@ -29,7 +29,7 @@ #include "scoped_thread_state_change-inl.h" #include "well_known_classes.h" -namespace art { +namespace art HIDDEN { void ArtField::SetOffset(MemberOffset num_bytes) { DCHECK(GetDeclaringClass()->IsLoaded() || GetDeclaringClass()->IsErroneous()); diff --git a/runtime/art_field.h b/runtime/art_field.h index 906eda408f..49899dafd6 100644 --- a/runtime/art_field.h +++ b/runtime/art_field.h @@ -17,6 +17,7 @@ #ifndef ART_RUNTIME_ART_FIELD_H_ #define ART_RUNTIME_ART_FIELD_H_ +#include "base/macros.h" #include "dex/modifiers.h" #include "dex/primitive.h" #include "gc_root.h" @@ -25,7 +26,7 @@ #include "read_barrier_option.h" #include "verify_object.h" -namespace art { +namespace art HIDDEN { class DexFile; template<typename T> class LengthPrefixedArray; @@ -39,7 +40,7 @@ class Object; class String; } // namespace mirror -class ArtField final { +class EXPORT ArtField final { public: // Visit declaring classes of all the art-fields in 'array' that reside // in [start_boundary, end_boundary). diff --git a/runtime/art_method-alloc-inl.h b/runtime/art_method-alloc-inl.h index 13051b156e..f91063c2d3 100644 --- a/runtime/art_method-alloc-inl.h +++ b/runtime/art_method-alloc-inl.h @@ -23,7 +23,7 @@ #include "handle_scope.h" #include "mirror/class-alloc-inl.h" -namespace art { +namespace art HIDDEN { namespace detail { diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h index 46c78d2b21..cca20879c2 100644 --- a/runtime/art_method-inl.h +++ b/runtime/art_method-inl.h @@ -46,7 +46,7 @@ #include "runtime-inl.h" #include "thread-current-inl.h" -namespace art { +namespace art HIDDEN { namespace detail { diff --git a/runtime/art_method.cc b/runtime/art_method.cc index 6bb33a13bb..dee62659e3 100644 --- a/runtime/art_method.cc +++ b/runtime/art_method.cc @@ -53,7 +53,7 @@ #include "scoped_thread_state_change-inl.h" #include "vdex_file.h" -namespace art { +namespace art HIDDEN { using android::base::StringPrintf; diff --git a/runtime/art_method.h b/runtime/art_method.h index e5384235fb..dff49e247b 100644 --- a/runtime/art_method.h +++ b/runtime/art_method.h @@ -39,7 +39,7 @@ #include "offsets.h" #include "read_barrier_option.h" -namespace art { +namespace art HIDDEN { class CodeItemDataAccessor; class CodeItemDebugInfoAccessor; @@ -84,7 +84,7 @@ template <char Shorty> struct HandleShortyTraits; template <> struct HandleShortyTraits<'L'>; } // namespace detail -class ArtMethod final { +class EXPORT ArtMethod final { public: // Should the class state be checked on sensitive operations? DECLARE_RUNTIME_DEBUG_FLAG(kCheckDeclaringClassState); diff --git a/runtime/art_method_test.cc b/runtime/art_method_test.cc index b1e9ed3879..8176cca062 100644 --- a/runtime/art_method_test.cc +++ b/runtime/art_method_test.cc @@ -23,7 +23,7 @@ #include "mirror/class-alloc-inl.h" #include "well_known_classes.h" -namespace art { +namespace art HIDDEN { namespace { // Helper function to avoid `ASSERT_EQ` with floating point types. |