Details
- Reviewers
ldionne EricWF - Group Reviewers
Restricted Project - Commits
- rG3601ee6cfd7f: [libcxxabi] Make InitByteGlobalMutex check GetThreadID instead of…
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Can you quickly explain why this is going to simplify your life in the other patches? Without knowing more about your motivations, I would say that PlatformSupportsThreadID() provides more information to the reader than testing PlatfromThreadID != nullptr, so I'd be tempted to think it's a useful abstraction to keep. Why are you removing it?
Removing PlatformSupportsThreadID() was not the purpose of this change. The purpose was to fix InitByteGlobalMutex. It just so happens that after fixing InitByteGlobalMutex, PlatformSupportsThreadID() is no longer used outside the test, at which point I figured it's dead code and should be removed. I could leave it there too, and it wouldn't cause any problems, but since all the Guards (except InitByteNoThreads) have a function pointer template parameter, they should be checking their template argument, not PlatfromThreadID, rendering PlatformSupportsThreadID useless anyways.
As for simplifying my life in the other patches, I suppose it doesn't really, and could probably go in as a separate patch independent of the rest of the cxa_guard re-write.
Ahhh I see, thanks. I hadn't read the commit description carefully, thanks a lot. LGTM (and good find)!
(I'm waiting for the other 5 related PRs to get approved before landing to reduce the number of times we have to resolve merge conflicts downstream)