This is an archive of the discontinued LLVM Phabricator instance.

[profile] Mark lprofCurFilename as COMPILER_RT_WEAK
ClosedPublic

Authored by vsk on Oct 17 2016, 3:54 PM.

Details

Summary

This makes __llvm_profile_set_filename() work across dylib boundaries on
Darwin.

This functionality was originally meant to work on all platforms, but
was moved to a Linux-only directory with r272404. The root cause of the
test failure on Darwin was that lprofCurFilename was not marked weak.
Each dylib maintained its own copy of the variable due to the two-level
namespace.

Tested with check-profile (on Darwin). I don't expect this to regress
other platforms.

Diff Detail

Event Timeline

vsk updated this revision to Diff 74928.Oct 17 2016, 3:54 PM
vsk retitled this revision from to [profile] Mark lprofCurFilename as COMPILER_RT_WEAK.
vsk updated this object.
vsk added a reviewer: davidxl.
vsk added a subscriber: llvm-commits.
davidxl accepted this revision.Oct 17 2016, 4:22 PM
davidxl edited edge metadata.

lgtm

This revision is now accepted and ready to land.Oct 17 2016, 4:22 PM
This revision was automatically updated to reflect the committed changes.