[PATCH] D40527: [libclang] Record parsing invocation to a temporary file when requested by client

Jan Korous via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 4 06:11:19 PST 2017


jkorous-apple added a comment.

LGTM otherwise.



================
Comment at: tools/libclang/CIndexer.h:45
+  std::string ToolchainPath;
+  llvm::sys::SmartMutex<false> Mutex;
+
----------------
I am just wondering - since we anticipate multi-threaded usage, shouldn't we synchronize access to all member variables mutable via public class interface?

Specifically - shouldn't we use one mutex per every mutating/reading method group?
- setInvocationEmissionPath(), getInvocationEmissionPath()
- setCXGlobalOptFlags(), isOptEnabled()
- getClangResourcesPath()


Repository:
  rC Clang

https://reviews.llvm.org/D40527





More information about the cfe-commits mailing list