[clang] [clang] Hide the `LangOptions` pointer from `CompilerInvocation` (PR #137675)

2025-04-29 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: The `unique_ptr` in `ASTUnit` always stores a **copy** of the `shared_ptr` in `CompilerInvocation`. https://github.com/llvm/llvm-project/pull/137675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][modules][deps] Optimize in-process timestamping of PCMs (PR #137363)

2025-04-29 Thread Jan Svoboda via cfe-commits
@@ -59,19 +60,46 @@ class InProcessModuleCache : public ModuleCache { InMemoryModuleCache InMemory; public: - InProcessModuleCache(ModuleCacheMutexes &Mutexes) : Mutexes(Mutexes) {} + InProcessModuleCache(ModuleCacheEntries &Entries) : Entries(Entries) {} void prepare

[clang] [Clang] Fix crash when -header-include-filtering is not specified (PR #136232)

2025-04-18 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 commented: The diagnostic is confusing - it tells the user they used an invalid combination of flags, but shows flags they did not use at all. I think we can improve on this and report when a flag is deduced/assumed/defaulted. https://github.com/llvm/llvm-projec

[clang] [clang] Enable making `CompilerInstance` diagnostics thread-safe (PR #136601)

2025-04-21 Thread Jan Svoboda via cfe-commits
@@ -861,9 +864,13 @@ class CompilerInstance : public ModuleLoader { /// /// Explicitly-specified \c VFS takes precedence over the VFS of this instance /// when creating the clone and also prevents \c FileManager sharing. - std::unique_ptr cloneForModuleCompile( - S

[clang] [Clang] Fix crash when -header-include-filtering is not specified (PR #136232)

2025-04-21 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I think so. Even if this gets diagnosed more clearly by the driver, users can bypass that using `-Xclang`. Even for me as a Clang developer this message would be confusing, especially in more complex scenarios (e.g. with response files involved). https://github.com/llvm/ll

[clang] [clang] Do not share ownership of `HeaderSearchOptions` (PR #132984)

2025-04-21 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I'm going to land this later this week unless tagged people have objections. https://github.com/llvm/llvm-project/pull/132984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang] Enable making `CompilerInstance` VFS thread-safe (PR #135737)

2025-04-21 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Ping. https://github.com/llvm/llvm-project/pull/135737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable making `CompilerInstance` VFS thread-safe (PR #135737)

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

[clang] [clang] Enable making `CompilerInstance` diagnostics thread-safe (PR #136601)

2025-04-21 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/136601 The `DiagnosticConsumer` interface is not thread-safe. To enable thread-safety of `CompilerInstance` objects cloned from the same parent, this PR allows passing an explicit `DiagnosticConsumer` to `cloneFo

[clang] [clang][modules] Minor improvements to diagnosing `out of date` errors (PR #136612)

2025-04-21 Thread Jan Svoboda via cfe-commits
@@ -3349,9 +3351,14 @@ ASTReader::ReadControlBlock(ModuleFile &F, .getModuleCache() .getInMemoryModuleCache() .isPCMFinal(F.FileName); - if (isDiagnosedResult(

[clang] [clang][modules] Minor improvements to diagnosing `out of date` errors (PR #136612)

2025-04-21 Thread Jan Svoboda via cfe-commits
@@ -3349,9 +3351,14 @@ ASTReader::ReadControlBlock(ModuleFile &F, .getModuleCache() .getInMemoryModuleCache() .isPCMFinal(F.FileName); - if (isDiagnosedResult(

[clang] [clang][deps] Propagate the entire service (PR #128959)

2025-02-27 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/128959 >From cb389c006e5ca28d5baef73625776a3e0e58b8af Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 26 Feb 2025 15:12:43 -0800 Subject: [PATCH 1/2] [clang][deps] Propagate the whole service Adding any kin

[clang] [clang][deps] Propagate the entire service (PR #128959)

2025-02-27 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/128959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Remove output file checks from `LockFileManager` (PR #130395)

2025-03-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/130395 Currently, `LockFileManager` assumes the owner of the lock file creates an output file. This is problematic for at least three reasons: 1. It is orthogonal to the main purpose of this class - mutual exclus

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/129751 >From 5f119a3a4ae8642d6ab0498c1cf6b39d5099c835 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 27 Feb 2025 15:23:18 -0800 Subject: [PATCH 1/5] [clang][modules][deps] Add mutex as an alternative to fi

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-06 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,66 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-06 Thread Jan Svoboda via cfe-commits
@@ -95,6 +96,10 @@ class DependencyScanningService { return SharedCache; } + ModuleCacheMutexes &getSharedModuleCacheMutexes() { jansvoboda11 wrote: We don't _need_ it, but we currently call `std::make_shared` for each TU, which is unnecessary. We co

[clang] [clang] Add partial-inlining options (PR #129024)

2025-03-10 Thread Jan Svoboda via cfe-commits
@@ -3394,6 +3394,10 @@ def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group; def fno_inline : Flag<["-"], "fno-inline">, Group, Visibility<[ClangOption, CC1Option]>; +def fpartial_inlining : Flag<["-"], "fpartial-inlining">, Group, jansvoboda

[clang] [llvm] [Support] Return `LockFileManager` errors right away (PR #130627)

2025-03-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130627 >From 88b5bbd1303480dc40db3ea76d0f831a69ff1957 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Sat, 8 Mar 2025 21:51:51 -0800 Subject: [PATCH 1/5] [Support] Return `LockFileManager` errors right away ---

[clang] [llvm] [Support] Remove output file checks from `LockFileManager` (PR #130395)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/130395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-11 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I don't know what the desired properties of this feature are exactly, but I'm concerned that this does not guarantee the resulting command line only refers to inputs in the sysroot. Imagine that we run this without the header search and VFS pruning optimizations - the comma

[clang] [llvm] [Support] Return `LockFileManager` errors right away (PR #130627)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130627 >From 88b5bbd1303480dc40db3ea76d0f831a69ff1957 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Sat, 8 Mar 2025 21:51:51 -0800 Subject: [PATCH 1/2] [Support] Return `LockFileManager` errors right away ---

[clang] [llvm] [Support] Return `LockFileManager` errors right away (PR #130627)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/130627 This patch removes some internal state out of `LockFileManager` by moving the locking code from the constructor into new member function `tryLock()` which returns the errors right away. This simplifies and

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

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/106274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Remove output file checks from `LockFileManager` (PR #130395)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130395 >From a9969c43be752ccaa70959fd4527a57dc2981881 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 6 Mar 2025 17:29:34 -0800 Subject: [PATCH 1/3] [Support] Remove output file checks from `LockFileManager

[clang] [clang][deps] Propagate the entire service (PR #128959)

2025-02-27 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/128959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Return `LockFileManager` errors right away (PR #130627)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/130627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] NFCI: Mutate `HeaderSearchOptions` earlier (PR #130823)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/130823 I would like to ensure that `CompilerInvocation` and its constituents are not mutated late during the compilation. This PR moves adjustment of the `HeaderSearchOptions::ModulesSkip{DiagnosticOptions,Header

[clang] [clang] Make `HeaderSearchOptions` references const (PR #130825)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/130825 This PR makes the `HeaderSearchOptions` object referenced by `HeaderSearch` constant. Depends on #130823. >From a38a64dd092ba4d476d91f91178af8fc6d96606b Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Th

[clang] [llvm] [Support] Return `LockFileManager` errors right away (PR #130627)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130627 >From 88b5bbd1303480dc40db3ea76d0f831a69ff1957 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Sat, 8 Mar 2025 21:51:51 -0800 Subject: [PATCH 1/6] [Support] Return `LockFileManager` errors right away ---

[clang] [llvm] [Support] Return `LockFileManager` errors right away (PR #130627)

2025-03-11 Thread Jan Svoboda via cfe-commits
@@ -158,41 +160,40 @@ class RemoveUniqueLockFileOnSignal { } // end anonymous namespace LockFileManager::LockFileManager(StringRef FileName) -{ - this->FileName = FileName; - if (std::error_code EC = sys::fs::make_absolute(this->FileName)) { -std::string S("failed to obt

[clang] 2f403ee - [clang][modules] NFC: Remove unused function parameter

2025-03-11 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-03-11T13:06:10-07:00 New Revision: 2f403ee4871465aa7fbb5e540bdc791466704f24 URL: https://github.com/llvm/llvm-project/commit/2f403ee4871465aa7fbb5e540bdc791466704f24 DIFF: https://github.com/llvm/llvm-project/commit/2f403ee4871465aa7fbb5e540bdc791466704f24.diff L

[clang] [llvm] [Support] Do not remove lock file on failure (PR #130834)

2025-03-12 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/130834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][modules] Introduce new `ModuleCache` interface (PR #131193)

2025-03-13 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/131193 This PR adds new `ModuleCache` interface to Clang's implicitly-built modules machinery. The main motivation for this change is to create a second implementation that uses a more efficient kind of `llvm::Ad

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-13 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/130989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130989 >From cd0b9a8b878c4ecd929552c836f3d4665e926ef4 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 12 Mar 2025 09:37:27 -0700 Subject: [PATCH 1/2] [Support] Introduce new `AdvisoryLock` interface This PR

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/129751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/129751 >From 5f119a3a4ae8642d6ab0498c1cf6b39d5099c835 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 27 Feb 2025 15:23:18 -0800 Subject: [PATCH 1/3] [clang][modules][deps] Add mutex as an alternative to fi

[clang] [llvm] [Support] Do not remove lock file on failure (PR #130834)

2025-03-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130834 >From 834eac8d3ce286172456e2a177d0e5284ade5b46 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 11 Mar 2025 09:17:50 -0700 Subject: [PATCH 1/2] [Support] Do not remove lock file on failure --- clang/

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

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

[clang] [clang][deps] Ensure DiagnosticConsumer::finish is always called (PR #127110)

2025-02-13 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: This makes sense in principle, but I'm wondering whether https://github.com/llvm/llvm-project/pull/100681 is the better approach. Seems like having the client call `finish()` is simpler than doing that "automatically" in `CompilerInstance::ExecuteAction()` and then trying t

[clang] [clang][deps] Ensure DiagnosticConsumer::finish is always called (PR #127110)

2025-02-13 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/127110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-02-20 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,164 @@ +//===- ModuleMapFile.h - Parsing and representation -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-02-20 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,164 @@ +//===- ModuleMapFile.h - Parsing and representation -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-02-20 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,164 @@ +//===- ModuleMapFile.h - Parsing and representation -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-02-20 Thread Jan Svoboda via cfe-commits
@@ -3157,25 +2140,18 @@ bool ModuleMap::parseModuleMapFile(FileEntryRef File, bool IsSystem, assert((!Offset || *Offset <= Buffer->getBufferSize()) && "invalid buffer offset"); - // Parse this module map file. - Lexer L(SourceMgr.getLocForStartOfFile(ID), MMapLan

[clang] [clang][deps] Propagate the entire service (PR #128959)

2025-02-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/128959 Shared state between dependency scanning workers is managed by the dependency scanning service. Right now, the members are individually threaded through the worker, action, and collector. This makes any c

[clang] [clang][modules] Separate parsing of modulemaps (PR #119740)

2025-02-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, but let's wait for the other reviewers. https://github.com/llvm/llvm-project/pull/119740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-26 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/128446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Jan Svoboda via cfe-commits
@@ -129,6 +129,26 @@ static void optimizeDiagnosticOpts(DiagnosticOptions &Opts, Opts.Remarks.clear(); } +static void optimizeCWD(FileSystemOptions &FSOpts, CodeGenOptions &CGOpts, +const std::string &CWD) { jansvoboda11 wrote: In LL

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Jan Svoboda via cfe-commits
@@ -492,8 +492,23 @@ static std::string getModuleContextHash(const ModuleDeps &MD, auto &FSOpts = const_cast(CI.getFileSystemOpts()); if (CWD && !IgnoreCWD) HashBuilder.add(*CWD); - else + else { FSOpts.WorkingDir.clear(); +auto &CGOpts = const_cast(CI.getCo

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 requested changes to this pull request. Leaving the correctness of the change up for other reviewers. My only gripe is the `const_cast`. https://github.com/llvm/llvm-project/pull/128446 ___ cfe-commits mailing list cfe-

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Jan Svoboda via cfe-commits
@@ -492,8 +492,23 @@ static std::string getModuleContextHash(const ModuleDeps &MD, auto &FSOpts = const_cast(CI.getFileSystemOpts()); jansvoboda11 wrote: Please create a follow-up patch to #124786 to remove the `const_cast` of `FileSystemOptions` here. http

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Jan Svoboda via cfe-commits
@@ -129,6 +129,26 @@ static void optimizeDiagnosticOpts(DiagnosticOptions &Opts, Opts.Remarks.clear(); } +static void optimizeCWD(FileSystemOptions &FSOpts, CodeGenOptions &CGOpts, +const std::string &CWD) { + FSOpts.WorkingDir.clear(); + if (CGOpts

[clang] [clang][deps] Respect `Lexer::cutOffLexing()` (PR #134404)

2025-04-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/134404 This is crucial when recovering from fatal loader errors. Without it, the `Lexer` keeps yielding more tokens and the compiler may access invalid `ASTReader` state. rdar://133388373 >From 62a5616b139c5bfc

[clang] [clang-tools-extra] [clang] Do not share ownership of `PreprocessorOptions` (PR #133467)

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

[clang] [clang] Do not share ownership of `HeaderSearchOptions` (PR #132984)

2025-04-04 Thread Jan Svoboda via cfe-commits
@@ -569,7 +569,7 @@ CrossTranslationUnitContext::ASTLoader::loadFromDump(StringRef ASTDumpPath) { return ASTUnit::LoadFromASTFile( ASTDumpPath, CI.getPCHContainerOperations()->getRawReader(), ASTUnit::LoadEverything, Diags, CI.getFileSystemOpts(), - CI.getHe

[clang] [clang] Do not share ownership of `HeaderSearchOptions` (PR #132984)

2025-04-04 Thread Jan Svoboda via cfe-commits
@@ -48,7 +48,7 @@ void ASTMergeAction::ExecuteAction() { /*ShouldOwnClient=*/true)); std::unique_ptr Unit = ASTUnit::LoadFromASTFile( ASTFiles[I], CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags, -CI.getFileSys

[clang] ea0869c - [clang][parse] Fix build of ParseHLSLRootSignatureTest.cpp

2025-04-04 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-04-04T10:20:44-07:00 New Revision: ea0869ccb9a80e235f6f47eaa47fb1d5888d660a URL: https://github.com/llvm/llvm-project/commit/ea0869ccb9a80e235f6f47eaa47fb1d5888d660a DIFF: https://github.com/llvm/llvm-project/commit/ea0869ccb9a80e235f6f47eaa47fb1d5888d660a.diff L

[clang] [clang][deps] Respect `Lexer::cutOffLexing()` (PR #134404)

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

[clang] [clang] Do not share ownership of `HeaderSearchOptions` (PR #132984)

2025-04-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/132984 >From 46de2dd2ceb82510f1e6719a34ad67164943983d Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 28 Mar 2025 09:02:12 -0700 Subject: [PATCH] [clang] Do not share ownership of `HeaderSearchOptions` ---

[clang] 15ad84f - [clang][deps] Explicitly link pthreads

2025-03-20 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-03-20T09:37:10-07:00 New Revision: 15ad84fffd76e845ce48f7cb8a917eb6532b93c9 URL: https://github.com/llvm/llvm-project/commit/15ad84fffd76e845ce48f7cb8a917eb6532b93c9 DIFF: https://github.com/llvm/llvm-project/commit/15ad84fffd76e845ce48f7cb8a917eb6532b93c9.diff L

[clang] 277ab85 - [clang] Make `PreprocessorOptions` reference const

2025-03-28 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-03-28T09:34:19-07:00 New Revision: 277ab85d1ccf80750f5193495c0665808c2863de URL: https://github.com/llvm/llvm-project/commit/277ab85d1ccf80750f5193495c0665808c2863de DIFF: https://github.com/llvm/llvm-project/commit/277ab85d1ccf80750f5193495c0665808c2863de.diff L

[clang] [clang][deps] Avoid unchecked error assertion (PR #134284)

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

[clang] [clang][deps] Avoid unchecked error assertion (PR #134284)

2025-04-03 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/134284 None >From c333f2bd8dc4ae9497f7def29d3f3989f309a991 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 3 Apr 2025 10:37:34 -0700 Subject: [PATCH] [clang][deps] Avoid unchecked error assertion --- clan

[clang] [clang][deps] Do check for relocated modules (PR #133827)

2025-04-03 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > > multi-project workspace builds cannot avoid hitting this kind of issue > > (demonstrated by the test) and they are left with a build error they cannot > > fix. > > Is this because a multi-project workspace results in separate build-products > directories but a single m

[clang] [clang][modules][deps] Implicit modules are out of date when their explicit imports are (PR #138920)

2025-05-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/138920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules][deps] Implicit modules are out of date when their explicit imports are (PR #138920)

2025-05-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/138920 >From 306a9ceab9aa77ccb2752e847339c5a67e672549 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 7 May 2025 10:10:47 -0700 Subject: [PATCH 1/2] [clang][modules][deps] Rebuild implicit modules when thei

[clang] [clang][modules][deps] Implicit modules are out of date when their explicit imports are (PR #138920)

2025-05-07 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,77 @@ +// Test that modifications to a common header (imported from both a PCH and a TU) +// cause rebuilds of dependent modules imported from the TU on incremental build. + +// RUN: rm -rf %t +// RUN: split-file %s %t + +//--- module.modulemap +module mod_common { he

[clang] [clang][modules][deps] Optimize in-process timestamping of PCMs (PR #137363)

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

[clang] [clang][modules][deps] Optimize in-process timestamping of PCMs (PR #137363)

2025-05-07 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: (Just adding a note here for my records that this speeds up from-scratch scans by 1.4% and incremental _null_ scans by 67% on my benchmark.) https://github.com/llvm/llvm-project/pull/137363 ___ cfe-commits mailing list cfe-commits@

[clang] [clang][Unit Test] Updating Negative Stat Caching Diagnostic Unit Test (PR #138955)

2025-05-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/138955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][modules] Timestamp-less validation API (PR #138983)

2025-05-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/138983 Timestamps are an implementation detail of the cross-process module cache implementation. This PR hide it from the `ModuleCache` API, which simplifies the in-process implementation. >From 8d594dd6ffdf2601

[clang] [clang][modules] Allow not forcing validation of user headers (PR #139091)

2025-05-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/139091 Force-validation of user headers was implemented in acb803e8 to deal with files changing during build. The dependency scanner guarantees an immutable file system during single build session, so the validat

[clang] [clang][modules][deps] Implicit modules are out of date when their explicit imports are (PR #138920)

2025-05-09 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,178 @@ +// Test that modifications to a common header (imported from both a PCH and a TU) +// cause rebuilds of dependent modules imported from the TU on incremental build. + +// RUN: rm -rf %t +// RUN: split-file %s %t + +//--- module.modulemap +module mod_common { h

[clang] [clang][modules] Allow not forcing validation of user headers (PR #139091)

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

[clang] [clang][deps] Do check for relocated modules (PR #133827)

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

[clang] [clang][modules][deps] Implicit modules are out of date when their explicit imports are (PR #138920)

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

[clang-tools-extra] [modularize] Use std::tie to implement operator< (NFC) (PR #139410)

2025-05-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/139410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-05-12 Thread Jan Svoboda via cfe-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

[clang] [clang-tools-extra] [clang][modules] Timestamp-less validation API (PR #138983)

2025-05-12 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/138983 >From 5ae3871b981d22583ce1b168cbbe3429317d89eb Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 24 Apr 2025 15:10:23 -0700 Subject: [PATCH] [clang][modules] Timestamp-less validation API --- clang-to

[clang] [clang-tools-extra] [clang][modules] Timestamp-less validation API (PR #138983)

2025-05-08 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/138983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-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 cfe-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 ___ cfe-commits mailing list cfe-commits

[clang] [clang][modules] Invalidate module cache when SDKSettings.json changes (PR #139751)

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

[clang] [clang][modules] Invalidate module cache when SDKSettings.json changes (PR #139751)

2025-05-13 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/139751 This PR adds the `%sdk/SDKSettings.json` file to the PCM input file table, so that the PCM gets invalidated when the file changes. This is necessary for availability checks to work correctly.

[clang] [clang][modules] Invalidate module cache when SDKSettings.json changes (PR #139751)

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

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

2025-05-14 Thread Jan Svoboda via cfe-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

[clang] [clang-tools-extra] [clang][modules] Timestamp-less validation API (PR #138983)

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

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

2025-05-14 Thread Jan Svoboda via cfe-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

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

2025-05-14 Thread Jan Svoboda via cfe-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

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

2025-05-14 Thread Jan Svoboda via cfe-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

[clang] [clang][lex] Introduce new single-module-parse mode (PR #135813)

2025-05-20 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/135813 >From 5cab1328fd689783ac4117083e231e7f0a49c3db Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 9 Apr 2025 13:11:38 -0700 Subject: [PATCH] [clang][lex] Introduce new single-module-parse mode --- clan

[clang-tools-extra] 7a24238 - Reland "[clang][modules] Timestamp-less validation API (#139987)"

2025-05-19 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-05-19T10:40:55-07:00 New Revision: 7a242387c950c7060143da6da0e6fb91f36bb458 URL: https://github.com/llvm/llvm-project/commit/7a242387c950c7060143da6da0e6fb91f36bb458 DIFF: https://github.com/llvm/llvm-project/commit/7a242387c950c7060143da6da0e6fb91f36bb458.diff L

[clang] 175f8a4 - [clang] Attempt to fix "test/Modules/fmodules-validate-once-per-build-session.c"

2025-05-19 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-05-19T12:11:11-07:00 New Revision: 175f8a444b296ba956505a5760805f05a175111b URL: https://github.com/llvm/llvm-project/commit/175f8a444b296ba956505a5760805f05a175111b DIFF: https://github.com/llvm/llvm-project/commit/175f8a444b296ba956505a5760805f05a175111b.diff L

[clang-tools-extra] 72b2219 - Revert "[clang][modules] Timestamp-less validation API (#139987)"

2025-05-19 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-05-19T12:57:54-07:00 New Revision: 72b2219b3e2319e29831e4e9b07c440444f3add6 URL: https://github.com/llvm/llvm-project/commit/72b2219b3e2319e29831e4e9b07c440444f3add6 DIFF: https://github.com/llvm/llvm-project/commit/72b2219b3e2319e29831e4e9b07c440444f3add6.diff L

[clang] [ASTWriter] Do not write ObjCCategories if empty. (PR #141841)

2025-05-28 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: This change makes sense to me. I have two questions: 1. Can we add a test that checks that the block is omitted? (maybe via `llvm-bcanalyzer -dump`) 2. Can we make the `explicit-build.cpp` test more robust? (possibly by writing out import signatures) https://github.com/llvm

[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-05-21 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: FWIW I tried running this patch through my `clang-scan-deps` benchmark on an internal Apple project and saw 16% increase in instruction count. https://github.com/llvm/llvm-project/pull/140867 ___ cfe-commits mailing list cfe-commit

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

2025-05-22 Thread Jan Svoboda via cfe-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 ___

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

2025-05-22 Thread Jan Svoboda via cfe-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

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

2025-05-22 Thread Jan Svoboda via cfe-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 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

<    10   11   12   13   14   15   16   >