[clang] [clang-tools-extra] [clang] Hide the `TargetOptions` pointer from `CompilerInvocation` (PR #106271)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 27 15:31:38 PDT 2024


================
@@ -302,9 +302,8 @@ class TargetInfo : public TransferrableTargetInfo,
   /// \param Opts - The options to use to initialize the target. The target may
   /// modify the options to canonicalize the target feature information to match
   /// what the backend expects.
-  static TargetInfo *
-  CreateTargetInfo(DiagnosticsEngine &Diags,
-                   const std::shared_ptr<TargetOptions> &Opts);
+  static TargetInfo *CreateTargetInfo(DiagnosticsEngine &Diags,
----------------
benlangmuir wrote:

We should update the doc comment to mention that `Opts` needs to outlive the resulting `TargetInfo`.

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


More information about the cfe-commits mailing list