[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
================
@@ -63,41 +56,39 @@ Compilation::getArgsForToolChain(const ToolChain *TC, StringRef BoundArch,
if (!TC)
TC = &DefaultToolChain;
- DerivedArgList *&Entry = TCArgs[{TC, BoundArch, DeviceOffloadKind}];
+ std::shared_ptr<DerivedArgList> &Entry =
----------------
DavidTruby wrote:
You can just use a reference to the unique_ptr here, since no ownership is being taken.
https://github.com/llvm/llvm-project/pull/116406
More information about the cfe-commits
mailing list