[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 17 07:58:29 PDT 2020


ldionne added a comment.

In D31413#2279182 <https://reviews.llvm.org/D31413#2279182>, @aaron.ballman wrote:

> Yes, and the way I would handle this is to change the `init_priority` value checking to allow values <= 100 if the attribute location is within a system header. This would allow libc++ to use the reserved priority but would still give errors when attempted from user code.

Ok, that makes sense. If Clang implements that change, I can go back and change it in libc++. I unfortunately don't have bandwidth to go and do that, since this isn't affecting a platform I directly work on. So if anyone's willing to go and change Clang to make that work, ping me here and I'll fix libc++.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D31413/new/

https://reviews.llvm.org/D31413



More information about the cfe-commits mailing list