[clang] [clang][Driver] Use shared_ptr in the Compilation class (PR #116406)

David Truby via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 06:13:23 PST 2024


================
@@ -100,7 +100,7 @@ class Compilation {
       return false;
     }
   };
-  std::map<TCArgsKey, llvm::opt::DerivedArgList *> TCArgs;
+  std::map<TCArgsKey, std::shared_ptr<llvm::opt::DerivedArgList>> TCArgs;
----------------
DavidTruby wrote:

This can be a unique_ptr, as TCArgs owns the underlying DerivedArgList.

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


More information about the cfe-commits mailing list