diff options
author | 2024-01-30 16:41:22 +0000 | |
---|---|---|
committer | 2024-01-31 13:05:44 +0000 | |
commit | 2779917408247b09762d0c265a21d37cbf880fe7 (patch) | |
tree | 631e6fba05cd4867a5e60a7eefd0544075be955a /runtime | |
parent | 5b9e42854c513d2f73466024b397634397a25ad6 (diff) |
Add visibility attributes in runtime/v*
Bug: 260881207
Test: presubmit
Test: abtd app_compat_drm
Test: abtd app_compat_top_100
Test: abtd app_compat_banking
Change-Id: Iac48967b3f72147d61f0120281875cb9aa370964
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/var_handles.cc | 2 | ||||
-rw-r--r-- | runtime/var_handles.h | 3 | ||||
-rw-r--r-- | runtime/vdex_file.cc | 2 | ||||
-rw-r--r-- | runtime/vdex_file.h | 50 | ||||
-rw-r--r-- | runtime/vdex_file_test.cc | 2 | ||||
-rw-r--r-- | runtime/verify_object-inl.h | 2 | ||||
-rw-r--r-- | runtime/verify_object.cc | 2 | ||||
-rw-r--r-- | runtime/verify_object.h | 4 |
8 files changed, 34 insertions, 33 deletions
diff --git a/runtime/var_handles.cc b/runtime/var_handles.cc index 884dd5c8a1..872e780612 100644 --- a/runtime/var_handles.cc +++ b/runtime/var_handles.cc @@ -23,7 +23,7 @@ #include "mirror/method_type-inl.h" #include "mirror/var_handle.h" -namespace art { +namespace art HIDDEN { namespace { diff --git a/runtime/var_handles.h b/runtime/var_handles.h index dd04a544b7..82056ca153 100644 --- a/runtime/var_handles.h +++ b/runtime/var_handles.h @@ -17,9 +17,10 @@ #ifndef ART_RUNTIME_VAR_HANDLES_H_ #define ART_RUNTIME_VAR_HANDLES_H_ +#include "base/macros.h" #include "mirror/var_handle.h" -namespace art { +namespace art HIDDEN { namespace mirror { class RawMethodType; diff --git a/runtime/vdex_file.cc b/runtime/vdex_file.cc index 2dc925f7a2..b67786c2a7 100644 --- a/runtime/vdex_file.cc +++ b/runtime/vdex_file.cc @@ -44,7 +44,7 @@ #include "runtime.h" #include "verifier/verifier_deps.h" -namespace art { +namespace art HIDDEN { using android::base::StringPrintf; diff --git a/runtime/vdex_file.h b/runtime/vdex_file.h index 2a5655f62c..4a1665b34d 100644 --- a/runtime/vdex_file.h +++ b/runtime/vdex_file.h @@ -29,7 +29,7 @@ #include "dex/dex_file.h" #include "handle.h" -namespace art { +namespace art HIDDEN { class ClassLoaderContext; class Thread; @@ -101,7 +101,7 @@ class VdexFile { struct VdexFileHeader { public: - explicit VdexFileHeader(bool has_dex_section); + EXPORT explicit VdexFileHeader(bool has_dex_section); const char* GetMagic() const { return reinterpret_cast<const char*>(magic_); } const char* GetVdexVersion() const { @@ -110,8 +110,8 @@ class VdexFile { uint32_t GetNumberOfSections() const { return number_of_sections_; } - bool IsMagicValid() const; - bool IsVdexVersionValid() const; + EXPORT bool IsMagicValid() const; + EXPORT bool IsVdexVersionValid() const; bool IsValid() const { return IsMagicValid() && IsVdexVersionValid(); } @@ -187,25 +187,25 @@ class VdexFile { // Returns nullptr if the vdex file cannot be opened or is not valid. // The mmap_* parameters can be left empty (nullptr/0/false) to allocate at random address. - static std::unique_ptr<VdexFile> OpenAtAddress(uint8_t* mmap_addr, - size_t mmap_size, - bool mmap_reuse, - const std::string& vdex_filename, - bool writable, - bool low_4gb, - std::string* error_msg); + EXPORT static std::unique_ptr<VdexFile> OpenAtAddress(uint8_t* mmap_addr, + size_t mmap_size, + bool mmap_reuse, + const std::string& vdex_filename, + bool writable, + bool low_4gb, + std::string* error_msg); // Returns nullptr if the vdex file cannot be opened or is not valid. // The mmap_* parameters can be left empty (nullptr/0/false) to allocate at random address. - static std::unique_ptr<VdexFile> OpenAtAddress(uint8_t* mmap_addr, - size_t mmap_size, - bool mmap_reuse, - int file_fd, - size_t vdex_length, - const std::string& vdex_filename, - bool writable, - bool low_4gb, - std::string* error_msg); + EXPORT static std::unique_ptr<VdexFile> OpenAtAddress(uint8_t* mmap_addr, + size_t mmap_size, + bool mmap_reuse, + int file_fd, + size_t vdex_length, + const std::string& vdex_filename, + bool writable, + bool low_4gb, + std::string* error_msg); // Returns nullptr if the vdex file cannot be opened or is not valid. static std::unique_ptr<VdexFile> Open(const std::string& vdex_filename, @@ -239,8 +239,8 @@ class VdexFile { error_msg); } - static std::unique_ptr<VdexFile> OpenFromDm(const std::string& filename, - const ZipArchive& archive); + EXPORT static std::unique_ptr<VdexFile> OpenFromDm(const std::string& filename, + const ZipArchive& archive); const uint8_t* Begin() const { return mmap_.Begin(); } const uint8_t* End() const { return mmap_.End(); } @@ -267,7 +267,7 @@ class VdexFile { // the first dex file is returned. If `cursor` is not null, it must point to a dex // file and this method returns the next dex file if there is one, or null if there // is none. - const uint8_t* GetNextDexFileData(const uint8_t* cursor, uint32_t dex_file_index) const; + EXPORT const uint8_t* GetNextDexFileData(const uint8_t* cursor, uint32_t dex_file_index) const; const uint8_t* GetNextTypeLookupTableData(const uint8_t* cursor, uint32_t dex_file_index) const; @@ -278,8 +278,8 @@ class VdexFile { } // Open all the dex files contained in this vdex file. - bool OpenAllDexFiles(std::vector<std::unique_ptr<const DexFile>>* dex_files, - std::string* error_msg) const; + EXPORT bool OpenAllDexFiles(std::vector<std::unique_ptr<const DexFile>>* dex_files, + std::string* error_msg) const; // Writes a vdex into `path` and returns true on success. // The vdex will not contain a dex section but will store checksums of `dex_files`, diff --git a/runtime/vdex_file_test.cc b/runtime/vdex_file_test.cc index 1ac10eb733..4c359e38c6 100644 --- a/runtime/vdex_file_test.cc +++ b/runtime/vdex_file_test.cc @@ -22,7 +22,7 @@ #include "base/common_art_test.h" -namespace art { +namespace art HIDDEN { class VdexFileTest : public CommonArtTest {}; diff --git a/runtime/verify_object-inl.h b/runtime/verify_object-inl.h index 363fde220d..b38fc9cf32 100644 --- a/runtime/verify_object-inl.h +++ b/runtime/verify_object-inl.h @@ -22,7 +22,7 @@ #include "mirror/object-inl.h" #include "obj_ptr-inl.h" -namespace art { +namespace art HIDDEN { inline bool VerifyClassClass(ObjPtr<mirror::Class> c) { if (UNLIKELY(c == nullptr)) { diff --git a/runtime/verify_object.cc b/runtime/verify_object.cc index 61b502df97..5684fc11c4 100644 --- a/runtime/verify_object.cc +++ b/runtime/verify_object.cc @@ -23,7 +23,7 @@ #include "runtime.h" #include "runtime_globals.h" -namespace art { +namespace art HIDDEN { void VerifyObjectImpl(ObjPtr<mirror::Object> obj) { if (kVerifyObjectSupport > kVerifyObjectModeFast) { diff --git a/runtime/verify_object.h b/runtime/verify_object.h index ae87cad9ab..d09e03a63a 100644 --- a/runtime/verify_object.h +++ b/runtime/verify_object.h @@ -22,7 +22,7 @@ #include "base/macros.h" #include "obj_ptr.h" -namespace art { +namespace art HIDDEN { namespace mirror { class Class; @@ -36,7 +36,7 @@ enum VerifyObjectMode { kVerifyObjectModeAll // Check heap accesses thoroughly. }; -enum VerifyObjectFlags { +enum EXPORT VerifyObjectFlags { kVerifyNone = 0x0, // Verify self when we are doing an operation. kVerifyThis = 0x1, |