-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clang][PGO] Fix profile function visibility bug #127257
[Clang][PGO] Fix profile function visibility bug #127257
Conversation
@llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-pgo Author: Ethan Luis McDonough (EthanLuisMcDonough) ChangesThis pull request fixes an issue that was introduced in #93365. Full diff: https://github.com/llvm/llvm-project/pull/127257.diff 1 Files Affected:
diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c
index 503d159fd9817..673cb9a5208bb 100644
--- a/compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/compiler-rt/lib/profile/InstrProfilingFile.c
@@ -1362,12 +1362,10 @@ COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File,
return 0;
}
-int __llvm_write_custom_profile(const char *Target,
- const __llvm_profile_data *DataBegin,
- const __llvm_profile_data *DataEnd,
- const char *CountersBegin,
- const char *CountersEnd, const char *NamesBegin,
- const char *NamesEnd) {
+COMPILER_RT_VISIBILITY int __llvm_write_custom_profile(
+ const char *Target, const __llvm_profile_data *DataBegin,
+ const __llvm_profile_data *DataEnd, const char *CountersBegin,
+ const char *CountersEnd, const char *NamesBegin, const char *NamesEnd) {
int ReturnValue = 0, FilenameLength, TargetLength;
char *FilenameBuf, *TargetFilename;
const char *Filename;
|
ac08c21
to
2f74702
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ethan! LGTM!
This pull request fixes an issue that was introduced in llvm#93365. `__llvm_write_custom_profile` visibility was causing issues on Darwin. This function needs to be publicly accessible in order to be accessed by libomptarget, so this pull request makes `__llvm_write_custom_profile` an explicitly exported symbol on Darwin. Tested on M3 and X86 macs.
This pull request fixes an issue that was introduced in llvm#93365. `__llvm_write_custom_profile` visibility was causing issues on Darwin. This function needs to be publicly accessible in order to be accessed by libomptarget, so this pull request makes `__llvm_write_custom_profile` an explicitly exported symbol on Darwin. Tested on M3 and X86 macs.
This pull request fixes an issue that was introduced in #93365.
__llvm_write_custom_profile
visibility was causing issues on Darwin. This function needs to be publicly accessible in order to be accessed by libomptarget, so this pull request makes__llvm_write_custom_profile
an explicitly exported symbol on Darwin. Tested on M3 and X86 macs.