summaryrefslogtreecommitdiff
path: root/toolchain-extras
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2021-05-13 18:37:06 -0700
committerPirama Arumuga Nainar <pirama@google.com>2021-05-17 21:49:06 -0700
commitd795a881fd2d3c213837cdc6c160e9ad3a92d8cc (patch)
tree31374a40b65ba3009e1f88590c7cccb7cd8d0790 /toolchain-extras
parentc3ca80495786372461e62ec94e553379a4a256e0 (diff)
downloadextras-d795a881fd2d3c213837cdc6c160e9ad3a92d8cc.tar.gz
Make constructor and at_exit handler non-static
Bug: http://b/187935521 This change fixes a crash in dalvikvm. These functions were mistakenly marked as static but doesn't need to be. Test: m CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="art"; atest -v art-run-test-001-HelloWorld Change-Id: I515addc298633437f1a91cf5e96d17c28c7a61ff
Diffstat (limited to 'toolchain-extras')
-rw-r--r--toolchain-extras/profile-clang-extras.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/toolchain-extras/profile-clang-extras.cpp b/toolchain-extras/profile-clang-extras.cpp
index 3efe321a..4e5aca97 100644
--- a/toolchain-extras/profile-clang-extras.cpp
+++ b/toolchain-extras/profile-clang-extras.cpp
@@ -37,11 +37,11 @@ static void llvm_signal_handler(__unused int signum) {
}
#if __ANDROID_API__ >= 21
-static void writeFileWithoutReturn() {
+void writeFileWithoutReturn() {
__llvm_profile_write_file();
}
-static __attribute__((constructor)) void register_quick_exit_handler(void) {
+__attribute__((constructor)) void register_quick_exit_handler(void) {
at_quick_exit(writeFileWithoutReturn);
}
#endif // #if __ANDROID_API__ >= 21