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

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 4 12:58:15 PST 2017


arphaman added inline comments.


================
Comment at: tools/libclang/CIndexer.h:45
+  std::string ToolchainPath;
+  llvm::sys::SmartMutex<false> Mutex;
+
----------------
jkorous-apple wrote:
> 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()
Actually CIndex is not thread safe, so we don't need the mutex. I'll remove it.


Repository:
  rC Clang

https://reviews.llvm.org/D40527





More information about the cfe-commits mailing list