Page MenuHomePhabricator

[libc++] Use init_priority(100) when possible
Needs ReviewPublic

Authored by ldionne on Feb 3 2021, 1:32 PM.

Details

Reviewers
aaron.ballman
Group Reviewers
Restricted Project
Summary

Priorities below 101 are reserved for the implementation, so that's what
we should be using here. That is unfortunately only supported on more
recent versions of Clang. See https://reviews.llvm.org/D31413 for details.

Diff Detail

Event Timeline

ldionne created this revision.Feb 3 2021, 1:32 PM
ldionne requested review of this revision.Feb 3 2021, 1:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 3 2021, 1:32 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne updated this revision to Diff 322110.Feb 8 2021, 7:52 AM

Try to fix the build by pretending we're in a system header.

ldionne added inline comments.
libcxx/src/experimental/memory_resource.cpp
79 ↗(On Diff #322110)

@arthur.j.odwyer Pinging you here since you wrote that code. Does this LGTY?

Quuxplusone added inline comments.
libcxx/src/experimental/memory_resource.cpp
79 ↗(On Diff #322110)

@ldionne: I just copied this line from experimental/... oh wait, this is experimental/... yeah, this was added by @EricWF in https://github.com/llvm/llvm-project/commit/4efaa30934e81 . IIUC, if we're sure this file is always compiled as C++14 at this point, then I don't even think it matters what we put here. In C++20 we should mark this variable constinit.

However, whatever you decide on, it'd be useful if you could add a review comment to D89057 .