[PATCH] D157459: Make DWARFContext more thread safe.
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 08:48:01 PDT 2023
JDevlieghere added a comment.
This looks fine to me. My only qualm is with the use of `Single/MultiThreading`. This could leave someone with the impression that we'll do work in parallel in the `DWARFContext`. Th is patch is all about thread safety. We have some prior art in llvm that uses the `ThreadSafe` and you used that for the thread safe context as well. I left some concrete suggestions inline.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h:135
DWARFContext(std::unique_ptr<const DWARFObject> DObj,
+ bool EnableMultiThreading,
std::string DWPName = "",
----------------
How about `bool ThreadSafe`?
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:246
+
+class SingleThreadedState : public DWARFContext::DWARFContextState {
+
----------------
How about `UnsafeDWARFContextState`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157459/new/
https://reviews.llvm.org/D157459
More information about the llvm-commits
mailing list