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

kadir çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 24 06:42:03 PDT 2025


================
@@ -216,7 +216,7 @@ enum OpenCLTypeKind : uint8_t {
 ///
 class TargetInfo : public TransferrableTargetInfo,
                    public RefCountedBase<TargetInfo> {
-  std::shared_ptr<TargetOptions> TargetOpts;
+  TargetOptions *TargetOpts;
----------------
kadircet wrote:

sorry for delay here.

i'd still lean towards being more conservative and keep this as an owning reference/copy (unless I am missing something about this being a requirement for COW semantics you're desiring), but i don't feel strong enough to block here. feel free to move forward.

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


More information about the cfe-commits mailing list