[compiler-rt] r281567 - Define the weak symbol added by r281546 on mac.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 18:04:33 PDT 2016
Author: ab
Date: Wed Sep 14 20:04:32 2016
New Revision: 281567
URL: http://llvm.org/viewvc/llvm-project?rev=281567&view=rev
Log:
Define the weak symbol added by r281546 on mac.
'weak' doesn't behave like it does on linux.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc?rev=281567&r1=281566&r2=281567&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_mac.cc Wed Sep 14 20:04:32 2016
@@ -747,4 +747,12 @@ void GetMemoryProfile(fill_profile_f cb,
} // namespace __sanitizer
+extern "C" {
+// Provide a definition on mac, where 'weak' symbols don't behave like on linux.
+SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
+void __sanitizer_print_memory_profile(int top_percent) {
+ (void)top_percent;
+}
+} // extern "C"
+
#endif // SANITIZER_MAC
More information about the llvm-commits
mailing list