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

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 28 11:28:24 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;
----------------
benlangmuir wrote:

Is there still a reason to keep this a pointer?

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


More information about the cfe-commits mailing list