[clang] [clang] Do not share ownership of `HeaderSearchOptions` (PR #132984)

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 28 11:33:38 PDT 2025


================
@@ -116,7 +116,7 @@ class ASTUnit {
   std::shared_ptr<Preprocessor>           PP;
   IntrusiveRefCntPtr<ASTContext>          Ctx;
   std::shared_ptr<TargetOptions>          TargetOpts;
-  std::shared_ptr<HeaderSearchOptions>    HSOpts;
+  std::unique_ptr<HeaderSearchOptions> HSOpts;
----------------
jansvoboda11 wrote:

(And didn't want to pay the initialization cost unconditionally.)

https://github.com/llvm/llvm-project/pull/132984


More information about the cfe-commits mailing list