EricWF added a comment. > It looks like this is caused by functions in libc++'s headers that are marked > to always be inlined. Since they are always inlined there is external > definition for the linker to get the address of. I have worked around this by > adding the no_instrument_function attribute to _LIBCPP_INLINE_VISIBILITY and > _LIBCPP_ALWAYS_INLINE.
That isn't quite correct. This problem only occurs on methods which are externally instantiated withing the dylib but there definitions are marked `__attribute__((visibility("hidden")))`. For example `std::string` and `std::num_get`. Therefore the compiler *knows* there is an externally available definition but its hidden from the linker. I would prefer to fix this by using `_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY` on these methods instead of `_LIBCPP_INLINE_VISIBILITY` or `_LIBCPP_ALWAYS_INLINE` instead. https://reviews.llvm.org/D25897 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits