diff options
author | 2024-01-05 14:35:17 +0000 | |
---|---|---|
committer | 2024-01-08 14:30:28 +0000 | |
commit | dc1794942e60f23bc3a22df33fefb7d6e7fc8bcb (patch) | |
tree | 2c6cb2d73ba4977caab97c41c86a4397ce5ec253 | |
parent | 13694dad58c046d7e3a455f63dd0b9fba5d1fe43 (diff) |
Add visibility attributes in runtime/arch
Bug: 260881207
Test: presubmit
Test: abtd app_compat_drm
Test: abtd app_compat_top_100
Test: abtd app_compat_banking
Change-Id: Iabe9b8cb781e36f4ccf988b659f2ea67784fec70
-rw-r--r-- | runtime/arch/arch_test.cc | 2 | ||||
-rw-r--r-- | runtime/arch/context-inl.h | 2 | ||||
-rw-r--r-- | runtime/arch/context.cc | 2 | ||||
-rw-r--r-- | runtime/arch/context.h | 4 | ||||
-rw-r--r-- | runtime/arch/instruction_set_features.cc | 2 | ||||
-rw-r--r-- | runtime/arch/instruction_set_features.h | 23 | ||||
-rw-r--r-- | runtime/arch/instruction_set_features_test.cc | 2 | ||||
-rw-r--r-- | runtime/arch/memcmp16.cc | 2 | ||||
-rw-r--r-- | runtime/arch/memcmp16.h | 5 | ||||
-rw-r--r-- | runtime/arch/stub_test.cc | 2 |
10 files changed, 24 insertions, 22 deletions
diff --git a/runtime/arch/arch_test.cc b/runtime/arch/arch_test.cc index 83fd986525..57df3c8775 100644 --- a/runtime/arch/arch_test.cc +++ b/runtime/arch/arch_test.cc @@ -22,7 +22,7 @@ #include "entrypoints/quick/callee_save_frame.h" #include "quick/quick_method_frame_info.h" -namespace art { +namespace art HIDDEN { class ArchTest : public CommonArtTest {}; diff --git a/runtime/arch/context-inl.h b/runtime/arch/context-inl.h index 453432bf34..fd81ae28fb 100644 --- a/runtime/arch/context-inl.h +++ b/runtime/arch/context-inl.h @@ -41,7 +41,7 @@ #error unimplemented #endif -namespace art { +namespace art HIDDEN { using RuntimeContextType = RUNTIME_CONTEXT_TYPE; diff --git a/runtime/arch/context.cc b/runtime/arch/context.cc index 82d8b6ca00..b9931c44f8 100644 --- a/runtime/arch/context.cc +++ b/runtime/arch/context.cc @@ -16,7 +16,7 @@ #include "context-inl.h" -namespace art { +namespace art HIDDEN { Context* Context::Create() { return new RuntimeContextType; diff --git a/runtime/arch/context.h b/runtime/arch/context.h index efeacd65a8..bfe322ec33 100644 --- a/runtime/arch/context.h +++ b/runtime/arch/context.h @@ -22,7 +22,7 @@ #include "base/macros.h" -namespace art { +namespace art HIDDEN { class QuickMethodFrameInfo; @@ -31,7 +31,7 @@ class QuickMethodFrameInfo; class Context { public: // Creates a context for the running architecture - static Context* Create(); + EXPORT static Context* Create(); virtual ~Context() {} diff --git a/runtime/arch/instruction_set_features.cc b/runtime/arch/instruction_set_features.cc index 17b9dc39bf..3ab98568e8 100644 --- a/runtime/arch/instruction_set_features.cc +++ b/runtime/arch/instruction_set_features.cc @@ -28,7 +28,7 @@ #include "x86/instruction_set_features_x86.h" #include "x86_64/instruction_set_features_x86_64.h" -namespace art { +namespace art HIDDEN { std::unique_ptr<const InstructionSetFeatures> InstructionSetFeatures::FromVariant( InstructionSet isa, const std::string& variant, std::string* error_msg) { diff --git a/runtime/arch/instruction_set_features.h b/runtime/arch/instruction_set_features.h index 1cb0fbb758..b31f30dcda 100644 --- a/runtime/arch/instruction_set_features.h +++ b/runtime/arch/instruction_set_features.h @@ -24,7 +24,7 @@ #include "arch/instruction_set.h" #include "base/macros.h" -namespace art { +namespace art HIDDEN { class ArmInstructionSetFeatures; class Arm64InstructionSetFeatures; @@ -36,22 +36,21 @@ class X86_64InstructionSetFeatures; class InstructionSetFeatures { public: // Process a CPU variant string for the given ISA and create an InstructionSetFeatures. - static std::unique_ptr<const InstructionSetFeatures> FromVariant(InstructionSet isa, - const std::string& variant, - std::string* error_msg); + EXPORT static std::unique_ptr<const InstructionSetFeatures> FromVariant( + InstructionSet isa, const std::string& variant, std::string* error_msg); // Process a CPU variant string for the given ISA and make sure the features advertised // are supported by the hardware. This is needed for Pixel3a which wrongly // reports itself as cortex-a75. - static std::unique_ptr<const InstructionSetFeatures> FromVariantAndHwcap( + EXPORT static std::unique_ptr<const InstructionSetFeatures> FromVariantAndHwcap( InstructionSet isa, const std::string& variant, std::string* error_msg); // Parse a bitmap for the given isa and create an InstructionSetFeatures. - static std::unique_ptr<const InstructionSetFeatures> FromBitmap(InstructionSet isa, - uint32_t bitmap); + EXPORT static std::unique_ptr<const InstructionSetFeatures> FromBitmap(InstructionSet isa, + uint32_t bitmap); // Turn C pre-processor #defines into the equivalent instruction set features for kRuntimeISA. - static std::unique_ptr<const InstructionSetFeatures> FromCppDefines(); + EXPORT static std::unique_ptr<const InstructionSetFeatures> FromCppDefines(); // Check if run-time detection of instruction set features is supported. // @@ -83,7 +82,7 @@ class InstructionSetFeatures { // Parse a string of the form "div,-atomic_ldrd_strd" adding and removing these features to // create a new InstructionSetFeatures. - std::unique_ptr<const InstructionSetFeatures> AddFeaturesFromString( + EXPORT std::unique_ptr<const InstructionSetFeatures> AddFeaturesFromString( const std::string& feature_list, std::string* error_msg) const WARN_UNUSED; // Are these features the same as the other given features? @@ -120,10 +119,10 @@ class InstructionSetFeatures { const ArmInstructionSetFeatures* AsArmInstructionSetFeatures() const; // Down cast this Arm64InstructionFeatures. - const Arm64InstructionSetFeatures* AsArm64InstructionSetFeatures() const; + EXPORT const Arm64InstructionSetFeatures* AsArm64InstructionSetFeatures() const; // Down cast this Riscv64InstructionFeatures. - const Riscv64InstructionSetFeatures* AsRiscv64InstructionSetFeatures() const; + EXPORT const Riscv64InstructionSetFeatures* AsRiscv64InstructionSetFeatures() const; // Down cast this X86InstructionFeatures. const X86InstructionSetFeatures* AsX86InstructionSetFeatures() const; @@ -152,7 +151,7 @@ class InstructionSetFeatures { private: DISALLOW_COPY_AND_ASSIGN(InstructionSetFeatures); }; -std::ostream& operator<<(std::ostream& os, const InstructionSetFeatures& rhs); +EXPORT std::ostream& operator<<(std::ostream& os, const InstructionSetFeatures& rhs); } // namespace art diff --git a/runtime/arch/instruction_set_features_test.cc b/runtime/arch/instruction_set_features_test.cc index 82b8242cfe..fbd21379c8 100644 --- a/runtime/arch/instruction_set_features_test.cc +++ b/runtime/arch/instruction_set_features_test.cc @@ -28,7 +28,7 @@ #include <android-base/logging.h> #include <android-base/stringprintf.h> -namespace art { +namespace art HIDDEN { #ifdef ART_TARGET_ANDROID diff --git a/runtime/arch/memcmp16.cc b/runtime/arch/memcmp16.cc index e714cfc18d..614a87856d 100644 --- a/runtime/arch/memcmp16.cc +++ b/runtime/arch/memcmp16.cc @@ -29,7 +29,7 @@ int32_t memcmp16_generic_static(const uint16_t* s0, const uint16_t* s1, size_t c return 0; } -namespace art { +namespace art HIDDEN { namespace testing { diff --git a/runtime/arch/memcmp16.h b/runtime/arch/memcmp16.h index 0226c4e8fd..1e857dbec5 100644 --- a/runtime/arch/memcmp16.h +++ b/runtime/arch/memcmp16.h @@ -20,6 +20,8 @@ #include <cstddef> #include <cstdint> +#include "base/macros.h" + // memcmp16 support. // // This can either be optimized assembly code, in which case we expect a function __memcmp16, @@ -47,10 +49,11 @@ static inline int32_t MemCmp16(const uint16_t* s0, const uint16_t* s1, size_t co return 0; } +// TODO(260881207): decide whether to hide this symbol. extern "C" int32_t memcmp16_generic_static(const uint16_t* s0, const uint16_t* s1, size_t count); #endif -namespace art { +namespace art HIDDEN { namespace testing { diff --git a/runtime/arch/stub_test.cc b/runtime/arch/stub_test.cc index 759cd9a574..d6d1065735 100644 --- a/runtime/arch/stub_test.cc +++ b/runtime/arch/stub_test.cc @@ -32,7 +32,7 @@ #include "mirror/object_array-alloc-inl.h" #include "scoped_thread_state_change-inl.h" -namespace art { +namespace art HIDDEN { class StubTest : public CommonRuntimeTest { |