vedgy added a comment. I am implementing the `StorePreamblesInMemory` bool option discussed earlier. It would be nice to be able to modify it at any time, because it can be an option in an IDE's UI and requiring to restart an IDE for the option change to take effect is undesirable. In order to make the setter thread-safe, the option can be stored as `std::atomic<bool> StorePreamblesInMemory` in `class CIndexer` and stored/loaded with `memory_order_relaxed`. Setting this option would apply only to subsequent `clang_parseTranslationUnit_Impl()` calls. The option can also be added to `CXIndexOptions` in order to allow setting its initial value reliably (not worrying whether it could be used before the setter gets called after index construction).
Is adding both the setter and the `CXIndexOptions` member OK or would you prefer only one of these two? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143418/new/ https://reviews.llvm.org/D143418 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits