Previously discussed with zturner on IRC.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp | ||
---|---|---|
59 ↗ | (On Diff #23029) | Can you change all these to: static llvm::ManagedStatic<std::once_flag> g_once_flag; std::call_once(*g_once_flag, ...); The reason for this is that Windows and MSVC don't yet have thread-safe initialization of function local statics that have a constructor. On most platforms, members of once_flag are linker initialized, but on Windows they have an actual constructor. You can add a TODO line that indicates that once we require MSVC 2015 as the minimum version, we can remove these and use regular std::once_flags. Same comment applies to all the rest of the occurrences in the file as well. |
Maybe a comment indicating why it's a ManagedStatic would also be helpful so people are aware of the history.
Ugh, I'm sorry. For some reason I didn't receive your comments via mail and noticed them only after commit.
I'll change them tomorrow morning and submit a new review.
Thanks,