[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-29 Thread Jan Svoboda via lldb-commits
jansvoboda11 wrote: Thanks for the concrete example! I think the key thing to realize is that the `DiagnosticsEngine` and `DiagnosticOptions` used for command-line parsing are typically throwaway and separate from those used for actual compilation. I suggest looking at how `cc1_main()` orchest

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-22 Thread Jan Svoboda via lldb-commits
jansvoboda11 wrote: Thanks, I'll fix those ASAP. https://github.com/llvm/llvm-project/pull/139584 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-22 Thread Jan Svoboda via lldb-commits
jansvoboda11 wrote: Are those in the upstream repo? If so, where are they coming from? I have a sparse checkout, so it's possible I missed some non-Clang and non-LLDB usages of `DiagnosticOptions`. https://github.com/llvm/llvm-project/pull/139584 ___

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-22 Thread Jan Svoboda via lldb-commits
jansvoboda11 wrote: Reverted the revert, since the build now fails due to the forward-fixes not being reverted... https://github.com/llvm/llvm-project/pull/139584 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-22 Thread Jan Svoboda via lldb-commits
jansvoboda11 wrote: > @jansvoboda11 I've revered your PR due buildbot failures above (and my local > build failures with the same error messages). I'm happy to try your revised > patch to see if it build cleanly. Thanks! I already forward-fixed both failures: d25f95fdbc5314f30618912e18f00ad4dd

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-14 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/139584 Rate limit ยท GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-14 Thread Jan Svoboda via lldb-commits
@@ -837,6 +838,7 @@ class ASTUnit { static std::unique_ptr LoadFromCommandLine( const char **ArgBegin, const char **ArgEnd, std::shared_ptr PCHContainerOps, + std::shared_ptr DiagOpts, jansvoboda11 wrote: Explained above. https://github.com

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-14 Thread Jan Svoboda via lldb-commits
@@ -107,6 +107,7 @@ class ASTUnit { private: std::unique_ptr LangOpts; + std::shared_ptr DiagOpts; jansvoboda11 wrote: I was hoping it could be, but the situation is a bit weird. The documentation for `ASTUnit::LoadFromCommandLine()` says the `Diagnostics

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-14 Thread Jan Svoboda via lldb-commits
@@ -2032,6 +2032,7 @@ class SourceManagerForFile { // as they are created in `createSourceManagerForFile` so that they can be // deleted in the reverse order as they are created. std::unique_ptr FileMgr; + std::unique_ptr DiagOpts; jansvoboda11 wrote: I

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)

2025-05-12 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/139584 The `DiagnosticOptions` class is currently intrusively reference-counted, which makes reasoning about its lifetime very difficult in some cases. For example, `CompilerInvocation` owns the `DiagnosticOption

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-05-06 Thread Jan Svoboda via lldb-commits
jansvoboda11 wrote: Test change LGTM, I was probably trying to get to a minimal test-case and ended up with something that was relying on implementation details. https://github.com/llvm/llvm-project/pull/132853 ___ lldb-commits mailing list lldb-commi

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang][frontend] Require invocation to construct `CompilerInstance` (PR #137668)

2025-05-01 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/137668 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang][frontend] Require invocation to construct `CompilerInstance` (PR #137668)

2025-04-29 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/137668 >From 692779413664a17287a1f34d4e3225ae8bc96ae0 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Mon, 21 Apr 2025 11:55:43 -0700 Subject: [PATCH 1/2] [clang][frontend] Require invocation for `CompilerInstan

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang][frontend] Require invocation to construct `CompilerInstance` (PR #137668)

2025-04-28 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/137668 This PR makes it so that `CompilerInvocation` needs to be provided to `CompilerInstance` on construction. There are a couple of benefits in my view: * Making it impossible to mis-use some `CompilerInstance`

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

2025-04-28 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/106271 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2025-04-25 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/106271 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2025-04-25 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/106271 >From 4431265f6be2b989b63e4562fa8def4448d336ab Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 27 Aug 2024 09:34:01 -0700 Subject: [PATCH 1/7] [clang] `TargetInfo` does not own `TargetOptions` --- c

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-15 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, thank you! https://github.com/llvm/llvm-project/pull/132853 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] bdbad3e - [lldb] Fix build after #132780

2025-03-25 Thread Jan Svoboda via lldb-commits
Author: Jan Svoboda Date: 2025-03-25T12:29:08-07:00 New Revision: bdbad3e4320509f632ae8b511d563136343d87d7 URL: https://github.com/llvm/llvm-project/commit/bdbad3e4320509f632ae8b511d563136343d87d7 DIFF: https://github.com/llvm/llvm-project/commit/bdbad3e4320509f632ae8b511d563136343d87d7.diff L

[Lldb-commits] [clang] [lldb] [clang] Split ObjectFilePCHContainerReader from ObjectFilePCHContainerWriter (PR #99599)

2024-07-19 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 approved this pull request. LGTM sans the missing newline at the end of file and file headers not aligned to 80 columns. https://github.com/llvm/llvm-project/pull/99599 ___ lldb-commits mailing list lldb-commits@lists.l

[Lldb-commits] [lldb] 446d38c - [lldb] Fix test build failure

2024-04-12 Thread Jan Svoboda via lldb-commits
Author: Jan Svoboda Date: 2024-04-12T10:48:54-07:00 New Revision: 446d38c65f72fd5d242a64182b05683577f683d3 URL: https://github.com/llvm/llvm-project/commit/446d38c65f72fd5d242a64182b05683577f683d3 DIFF: https://github.com/llvm/llvm-project/commit/446d38c65f72fd5d242a64182b05683577f683d3.diff L

[Lldb-commits] [clang] [flang] [lldb] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2024-01-19 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 approved this pull request. LGTM once CI passes and Flang conflicts are resolved. https://github.com/llvm/llvm-project/pull/75530 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[Lldb-commits] [lldb] [clang] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via lldb-commits
@@ -1722,6 +1738,11 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, #include "clang/Driver/Options.inc" #undef CODEGEN_OPTION_WITH_MARSHALLING +#define DEBUG_OPTION_WITH_MARSHALLING(...) \

[Lldb-commits] [llvm] [lldb] [clang] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via lldb-commits
@@ -224,19 +233,20 @@ class CompilerInvocation : public CompilerInvocationBase { /// @{ // Note: These need to be pulled in manually. Otherwise, they get hidden by // the mutable getters with the same names. - using CompilerInvocationBase::getLangOpts; - using CompilerI

[Lldb-commits] [lldb] [clang] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via lldb-commits
@@ -11,6 +11,7 @@ #include "clang/APINotes/APINotesOptions.h" #include "clang/Basic/CodeGenOptions.h" +#include "clang/Basic/DebugOptions.h" jansvoboda11 wrote: Wouldn't a forward declaration be enough in this case? https://github.com/llvm/llvm-project/pull/

[Lldb-commits] [clang] [llvm] [lldb] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via lldb-commits
@@ -11,46 +11,13 @@ namespace clang { -CodeGenOptions::CodeGenOptions() { -#define CODEGENOPT(Name, Bits, Default) Name = Default; -#define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default); -#include "clang/Basic/CodeGenOptions.def" +CodeGenOptions::CodeGenOption

[Lldb-commits] [clang] [lldb] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 requested changes to this pull request. This looks pretty nice, I left just a couple of notes. You might want to take a look at the CI failures. https://github.com/llvm/llvm-project/pull/75530 ___ lldb-commits mailing l

[Lldb-commits] [clang] [llvm] [lldb] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via lldb-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/75530 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 2fc90af - [lldb] Fix build after 2da8f30c

2023-09-29 Thread Jan Svoboda via lldb-commits
Author: Jan Svoboda Date: 2023-09-29T10:01:37-07:00 New Revision: 2fc90afdac451b49d67c72bd41a99886811dd36c URL: https://github.com/llvm/llvm-project/commit/2fc90afdac451b49d67c72bd41a99886811dd36c DIFF: https://github.com/llvm/llvm-project/commit/2fc90afdac451b49d67c72bd41a99886811dd36c.diff L

[Lldb-commits] [lldb] 3f092f3 - [llvm] Extract common `OptTable` bits into macros

2023-08-04 Thread Jan Svoboda via lldb-commits
Author: Jan Svoboda Date: 2023-08-04T13:57:13-07:00 New Revision: 3f092f37b7362447cbb13f5502dae4bdd5762afd URL: https://github.com/llvm/llvm-project/commit/3f092f37b7362447cbb13f5502dae4bdd5762afd DIFF: https://github.com/llvm/llvm-project/commit/3f092f37b7362447cbb13f5502dae4bdd5762afd.diff L

[Lldb-commits] [lldb] 74113a4 - [lldb] Fix build error after 7bca6f45

2023-06-15 Thread Jan Svoboda via lldb-commits
Author: Jan Svoboda Date: 2023-06-15T11:59:47+02:00 New Revision: 74113a4150d683c9478331ae91018ab9092a634d URL: https://github.com/llvm/llvm-project/commit/74113a4150d683c9478331ae91018ab9092a634d DIFF: https://github.com/llvm/llvm-project/commit/74113a4150d683c9478331ae91018ab9092a634d.diff L

[Lldb-commits] [lldb] e348dbc - [lldb] Fix build after Clang API change

2023-05-30 Thread Jan Svoboda via lldb-commits
Author: Jan Svoboda Date: 2023-05-30T14:08:04-07:00 New Revision: e348dbc4b2766f17c251b6c305a3b34fbdb9be96 URL: https://github.com/llvm/llvm-project/commit/e348dbc4b2766f17c251b6c305a3b34fbdb9be96 DIFF: https://github.com/llvm/llvm-project/commit/e348dbc4b2766f17c251b6c305a3b34fbdb9be96.diff L

[Lldb-commits] [lldb] e04fc2d - [llvm][lldb] Remove unused SmallVectorMemoryBuffer.h includes

2021-12-09 Thread Jan Svoboda via lldb-commits
Author: Jan Svoboda Date: 2021-12-09T11:32:13+01:00 New Revision: e04fc2d88efa60ed5527b90c15d8fc188739e989 URL: https://github.com/llvm/llvm-project/commit/e04fc2d88efa60ed5527b90c15d8fc188739e989 DIFF: https://github.com/llvm/llvm-project/commit/e04fc2d88efa60ed5527b90c15d8fc188739e989.diff L