This is an archive of the discontinued LLVM Phabricator instance.

Enable building and using atomic shared_ptr for GCC.
ClosedPublic

Authored by EricWF on Jun 15 2016, 1:58 PM.

Details

Summary

Currently the implementation of [util.smartptr.shared.atomic] is provided only when using Clang, and not with GCC. This is a relic of not having a GCC implementation of <atomic>, even though <atomic> isn't actually used in the implementation. This patch enables support for atomic shared_ptr functions when using GCC.

Note that this is not a header only change. Previously only Clang builds of libc++.so would provide the required symbols. There is no reason for this restriction.
After this change both Clang and GCC builds should be binary compatible with each other WRT these symbols.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 60894.Jun 15 2016, 1:58 PM
EricWF retitled this revision from to Enable building and using atomic shared_ptr for GCC..
EricWF updated this object.
EricWF added reviewers: mclow.lists, rmaprath.
EricWF added a subscriber: cfe-commits.
rmaprath edited edge metadata.Jun 15 2016, 11:28 PM

LGTM. I'll leave you to commit if Marshall has no objection.

Thanks!

/ Asiri

EricWF accepted this revision.Jun 17 2016, 7:19 PM
EricWF added a reviewer: EricWF.

Accepting.

This revision is now accepted and ready to land.Jun 17 2016, 7:19 PM
EricWF closed this revision.Jun 17 2016, 7:19 PM