[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 review_requested https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/65412: >From dd1c433670028232f172a5372cc325d0c85f9d4f Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Sep 2023 12:54:51 -0700 Subject: [PATCH] [clang] Introduce copy-on-write `CompilerInvocation` When

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir unresolved https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir resolved https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir resolved https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir resolved https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir resolved https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir resolved https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir resolved https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir resolved https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir resolved https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: This basically LGTM, but could we add some unit tests for the new type? https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 review_requested https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/65412: >From 1cf820b6e89b8747ed77bf998e0c0784a23bf851 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 7 Sep 2023 12:54:51 -0700 Subject: [PATCH] [clang] Introduce copy-on-write `CompilerInvocation` ---

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Made the entirety of `ValBase` ref-counted in https://github.com/llvm/llvm-project/pull/65647, which also resolves some other comments here. https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
@@ -4588,28 +4641,29 @@ std::string CompilerInvocation::getModuleHash() const { return toString(llvm::APInt(64, Hash), 36, /*Signed=*/false); } -void CompilerInvocation::generateCC1CommandLine( +void CompilerInvocationBase::generateCC1CommandLine( ArgumentConsumer

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -123,49 +123,101 @@ static Expected> parseToleranceOption(StringRef Arg) { } //===--===// -// Initialization. +// Storage details.

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
@@ -123,49 +123,101 @@ static Expected> parseToleranceOption(StringRef Arg) { } //===--===// -// Initialization. +// Storage details.

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
@@ -123,49 +123,101 @@ static Expected> parseToleranceOption(StringRef Arg) { } //===--===// -// Initialization. +// Storage details.

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
@@ -154,46 +146,158 @@ class CompilerInvocationValueBase { PreprocessorOutputOptions PreprocessorOutputOpts; public: - MigratorOptions () { return MigratorOpts; } + // clang-format off const MigratorOptions () const { return MigratorOpts; } - - CodeGenOptions () {

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
@@ -94,47 +96,37 @@ class CompilerInvocationRefBase { /// Options controlling the static analyzer. AnalyzerOptionsRef AnalyzerOpts; - CompilerInvocationRefBase(); - CompilerInvocationRefBase(const CompilerInvocationRefBase ); -

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Jan Svoboda via cfe-commits
@@ -94,47 +96,37 @@ class CompilerInvocationRefBase { /// Options controlling the static analyzer. AnalyzerOptionsRef AnalyzerOpts; - CompilerInvocationRefBase(); - CompilerInvocationRefBase(const CompilerInvocationRefBase ); -

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -94,47 +96,37 @@ class CompilerInvocationRefBase { /// Options controlling the static analyzer. AnalyzerOptionsRef AnalyzerOpts; - CompilerInvocationRefBase(); - CompilerInvocationRefBase(const CompilerInvocationRefBase ); -

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -123,49 +123,101 @@ static Expected> parseToleranceOption(StringRef Arg) { } //===--===// -// Initialization. +// Storage details.

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -94,47 +96,37 @@ class CompilerInvocationRefBase { /// Options controlling the static analyzer. AnalyzerOptionsRef AnalyzerOpts; - CompilerInvocationRefBase(); - CompilerInvocationRefBase(const CompilerInvocationRefBase ); -

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -123,49 +123,101 @@ static Expected> parseToleranceOption(StringRef Arg) { } //===--===// -// Initialization. +// Storage details.

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -154,46 +146,158 @@ class CompilerInvocationValueBase { PreprocessorOutputOptions PreprocessorOutputOpts; public: - MigratorOptions () { return MigratorOpts; } + // clang-format off const MigratorOptions () const { return MigratorOpts; } - - CodeGenOptions () {

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -94,47 +96,37 @@ class CompilerInvocationRefBase { /// Options controlling the static analyzer. AnalyzerOptionsRef AnalyzerOpts; - CompilerInvocationRefBase(); - CompilerInvocationRefBase(const CompilerInvocationRefBase ); -

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -66,16 +66,18 @@ bool ParseDiagnosticArgs(DiagnosticOptions , llvm::opt::ArgList , DiagnosticsEngine *Diags = nullptr, bool DefaultDiagColor = true); +namespace CompilerInvocationDetail { /// The base class of

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Shafik Yaghmour via cfe-commits
@@ -4588,28 +4641,29 @@ std::string CompilerInvocation::getModuleHash() const { return toString(llvm::APInt(64, Hash), 36, /*Signed=*/false); } -void CompilerInvocation::generateCC1CommandLine( +void CompilerInvocationBase::generateCC1CommandLine( ArgumentConsumer

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: nit https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-06 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/65412: >From 5f8e316a774dbd18cbdf98d507bc6910de3d37d4 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 31 Aug 2023 11:39:32 -0700 Subject: [PATCH] [clang] Introduce copy-on-write `CompilerInvocation` ---

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-06 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I evicted a couple of commits from this PR in order to work better with the new GitHub PR "squash and merge" workflow. I'll create new PRs for the remaining commits. https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-06 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-06 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/65412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits