[clang] [clang][modules][deps]Remove -F option from test for clang-scan-deps (PR #141614)

2025-05-28 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: @jamieschmeiser I apologize if this is obvious, but is it a requirement that clang options follow the same conventions as gcc? If so, where is that documented? https://github.com/llvm/llvm-project/pull/141614 ___ cfe-commits mailin

[clang] [clang][modules][deps]Remove -F option from test for clang-scan-deps (PR #141614)

2025-05-28 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > what is the correct way to enable support for -F in clang tests? @jamieschmeiser can you please answer my question? https://github.com/llvm/llvm-project/pull/141614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [Modules] Don't fail when an unused textual header is missing. (PR #138227)

2025-05-28 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: Firstly, thank you for your responsiveness @ilya-biryukov, and for helping us understand how this bug fix impacts Google's build. For all individuals involved in this discussion, I would like to remind that our [code of conduct](https://llvm.org/docs/CodeOfConduct.html) doe

[clang] [clang][modules][deps]Remove -F option from test for clang-scan-deps (PR #141614)

2025-05-27 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM, thanks! >not all platforms support -F, which is a g++ extension. It indeed looks unecessary for this test but what is the correct way enable support for `-F` in clang tests? I would actally expect it to show up often in our te

[clang] [Modules] Don't fail when an unused textual header is missing. (PR #138227)

2025-05-23 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > And, in the end, the folks debugging this (Ilya & co) are busy working on > clang header module reproduction and reduction tools: > https://github.com/emaxx-google/cvise/branches @emaxx-google Interestingly enough, @vsapsai is also working on reproducers for explicitly bu

[clang] [clang][Darwin] Add test checking for tls support on xros target triples (PR #141170)

2025-05-22 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/141170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Add test checking for tls support on xros target triples (PR #141170)

2025-05-22 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/141170 None >From 845121fefce0243426d640989f6fdc7008f0b2ef Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 22 May 2025 17:58:00 -0700 Subject: [PATCH] [clang][Darwin] Add test checking for tls support on xr

[clang] Revert "[clang][Dependency Scanning] Report What a Module Exports during Scanning (#137421)" (PR #140820)

2025-05-20 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. https://github.com/llvm/llvm-project/pull/140820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] update diagnostic to say 'modification time' instead of mtime, NFC (PR #139637)

2025-05-12 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/139637 None >From ef70cfb8d8a468f87758b4f2f8c6efd85e5023ba Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 12 May 2025 16:02:22 -0700 Subject: [PATCH] [clang] update diagnostic to say 'modification time' in

[clang] [llvm] [Support] Avoid setting minor/subminor/build in VersionTuple::withMajorReplaced (PR #139318)

2025-05-09 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/139318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Avoid setting minor/subminor/build in VersionTuple::withMajorReplaced (PR #139318)

2025-05-09 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/139318 >From 9a733c05d8ab18c1a7c45fc159718994a544f722 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Fri, 9 May 2025 12:16:14 -0700 Subject: [PATCH 1/2] [llvm][Support] Avoid setting minor/subminor/build in Ver

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

2025-05-09 Thread Cyndy Ishida 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][deps] Implicit modules are out of date when their explicit imports are (PR #138920)

2025-05-09 Thread Cyndy Ishida 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][deps] Implicit modules are out of date when their explicit imports are (PR #138920)

2025-05-09 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM 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] Remove "unknown" from availability diags (PR #138610)

2025-05-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/138610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-installapi] Store dylib attributes in the order they are passed on the command line. (PR #139087)

2025-05-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/139087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove "unknown" from availability diags (PR #138610)

2025-05-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/138610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove "unknown" from availability diags (PR #138610)

2025-05-08 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > The change looks reasonable but can you add a test? thanks! Open to other suggestions @cor3ntin, but I didn't figure out a way to ensure part of a diagnostic was omitted with cc1's `-verify` so its a driver test that uses `FIleCheck` https://github.com/llvm/llvm-project/p

[clang] [clang] Remove "unknown" from availability diags (PR #138610)

2025-05-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/138610 >From d642c83835743409395a2b7a091eac8bf5c948c4 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 5 May 2025 16:09:00 -0700 Subject: [PATCH 1/2] [clang] Remove "unknown" from availability diags Previous

[clang] [clang] Remove "unknown" from availability diags (PR #138610)

2025-05-08 Thread Cyndy Ishida via cfe-commits
@@ -709,7 +711,7 @@ static AvailabilityResult CheckAvailability(ASTContext &Context, << EnvName << HintMessage; cyndyishida wrote: no ๐Ÿ˜… https://github.com/llvm/llvm-project/pull/138610 ___ cfe-commits ma

[clang] [clang] Remove "unknown" from availability diags (PR #138610)

2025-05-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/138610 Rate limit ยท GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sa

[clang] [clang-installapi] Store dylib attributes in the order they are passed on the command line. (PR #139087)

2025-05-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/139087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-installapi] Store dylib attributes in the order they are passed on the command line. (PR #139087)

2025-05-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/139087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove "unknown" from availability diags (PR #138610)

2025-05-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/138610 Previously, diagnostics like `error: 'fNew' is unavailable: introduced in macOS 11 unknown` were getting emitted when the active target triple didn't have an environment tied to it. Instead, add a guard aga

[clang] [clang][Dependency Scanning] Report What a Module Exports during Scanning (PR #137421)

2025-04-30 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Report What a Module Exports during Scanning (PR #137421)

2025-04-30 Thread Cyndy Ishida via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { cyndyishida wrote: For case 1. i'd argue that `for (const auto &Info : ClangModuleDeps)` is less readable than `for (const auto &[ID, isExported] : ClangModuleDeps)` For case 3, that

[clang] [clang][Dependency Scanning] Report What a Module Exports during Scanning (PR #137421)

2025-04-30 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Report What a Module Exports during Scanning (PR #137421)

2025-04-30 Thread Cyndy Ishida via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { cyndyishida wrote: for that `using DepInfo = std::pair` achieves the same thing, right? & you can unpack it like `auto [MID, isExported] = ClangModuleDeps.first()` I don't feel that st

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Cyndy Ishida via cfe-commits
@@ -183,7 +192,7 @@ struct ModuleDeps { /// /// This may include modules with a different context hash when it can be /// determined that the differences are benign for this compilation. - std::vector ClangModuleDeps; + std::vector ClangModuleDeps; cynd

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Cyndy Ishida via cfe-commits
@@ -0,0 +1,164 @@ +// Test correctly reporting what a module exports during dependency scanning. +// Module A depends on modules B, C and D, but only exports B and C. +// Module E depends on modules B, C and D, and exports all of them. + +// RUN: rm -rf %t +// RUN: split-file %s %

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Cyndy Ishida via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { cyndyishida wrote: nit: why not use a `std::pair`? It comes with operator overloads. Also, assuming this field is only intended for representing objects in `ClangModuleDeps`, maybe the

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/137068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/137068 >From bb548cb398714ae77b6fd2f782b172d8b9032a2f Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 23 Apr 2025 14:47:17 -0700 Subject: [PATCH 1/3] [clang][Modules] Diagnose mismatching pcm dependencies in

[clang] [clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency (PR #137432)

2025-04-28 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. AFAICT this seems like a good cleanup for detangling sdk dependencies where its safe to. https://github.com/llvm/llvm-project/pull/137432 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [clang] Enable making the module build stack thread-safe (PR #137059)

2025-04-24 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. https://github.com/llvm/llvm-project/pull/137059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-23 Thread Cyndy Ishida via cfe-commits
@@ -3311,11 +3312,22 @@ ASTReader::ReadControlBlock(ModuleFile &F, SignatureBytes.end()); Blob = Blob.substr(ASTFileSignature::size); +// Use BaseDirectoryAsWritten to ensure we use the same path in the +

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-23 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/137068 >From bb548cb398714ae77b6fd2f782b172d8b9032a2f Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 23 Apr 2025 14:47:17 -0700 Subject: [PATCH] [clang][Modules] Diagnose mismatching pcm dependencies in ex

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-23 Thread Cyndy Ishida via cfe-commits
@@ -3311,11 +3312,22 @@ ASTReader::ReadControlBlock(ModuleFile &F, SignatureBytes.end()); Blob = Blob.substr(ASTFileSignature::size); +// Use BaseDirectoryAsWritten to ensure we use the same path in the +

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-23 Thread Cyndy Ishida via cfe-commits
@@ -3311,11 +3312,22 @@ ASTReader::ReadControlBlock(ModuleFile &F, SignatureBytes.end()); Blob = Blob.substr(ASTFileSignature::size); +// Use BaseDirectoryAsWritten to ensure we use the same path in the +

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-23 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/137068 In an explicit build, the dependency scanner generates invocations with dependencies to module files to use during compilation. The pcm's passed in the invocations should match the ones that were imported b

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

2025-04-23 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/136612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Make dependency directives getter thread-safe (PR #136178)

2025-04-23 Thread Cyndy Ishida via cfe-commits
@@ -357,6 +357,32 @@ static void canonicalizeDefines(PreprocessorOptions &PPOpts) { std::swap(PPOpts.Macros, NewMacros); } +class ActualDependencyDirectivesGetter : public DependencyDirectivesGetter { cyndyishida wrote: nit: s/ActualDependencyDirectivesGet

[clang] [clang][deps] Make dependency directives getter thread-safe (PR #136178)

2025-04-23 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. https://github.com/llvm/llvm-project/pull/136178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-22 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/136612 >From 046b60179ee5eddc6db2193406bfc2ef10fda3df Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 21 Apr 2025 13:20:12 -0700 Subject: [PATCH 1/5] [clang][Modules] Report when` lookupModuleFile` fails and

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

2025-04-22 Thread Cyndy Ishida via cfe-commits
@@ -0,0 +1,62 @@ +/// This tests the expected error case when there is a mismatch between the pcm dependencies passed in +/// the command line with `fmodule-file` and whats encoded in the pcm. + +/// The steps are: +/// 1. Build module (A-1) with no dependencies. +/// 2. Build

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

2025-04-22 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > Does the described test case look like a build system problem? In my > understanding at step 4 we should have re-scanned B to know that we need some > B'.pcm depending on A-2.pcm. Regardless of the answer I don't want to block > the change as it is still an improvement. Ju

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

2025-04-22 Thread Cyndy Ishida via cfe-commits
@@ -3349,10 +3351,29 @@ 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-22 Thread Cyndy Ishida via cfe-commits
@@ -3349,10 +3351,29 @@ ASTReader::ReadControlBlock(ModuleFile &F, .getModuleCache() .getInMemoryModuleCache() .isPCMFinal(F.FileName); - if (isDiagnosedResult

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

2025-04-22 Thread Cyndy Ishida 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] Enable making `CompilerInstance` diagnostics thread-safe (PR #136601)

2025-04-22 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. https://github.com/llvm/llvm-project/pull/136601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-22 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/136612 >From 046b60179ee5eddc6db2193406bfc2ef10fda3df Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 21 Apr 2025 13:20:12 -0700 Subject: [PATCH 1/4] [clang][Modules] Report when` lookupModuleFile` fails and

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

2025-04-21 Thread Cyndy Ishida 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 Cyndy Ishida via cfe-commits
@@ -0,0 +1,62 @@ +/// This tests the expected error case when there is a mismatch between the pcm dependencies passed in +/// the command line with `fmodule-file` and whats encoded in the pcm. + +/// The steps are: +/// 1. Build module (A-1) with no dependencies. +/// 2. Build

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

2025-04-21 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/136612 >From 046b60179ee5eddc6db2193406bfc2ef10fda3df Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 21 Apr 2025 13:20:12 -0700 Subject: [PATCH 1/3] [clang][Modules] Report when` lookupModuleFile` fails and

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

2025-04-21 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > What would happen if both A-1.pcm and A-2.pcm are built for the same files > (e.g., from Sysroot) but have different file names? Not saying it is a valid > use case to support, just curious what would happen. I tried this, where basically `A-1.pcm` is built again but with

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

2025-04-21 Thread Cyndy Ishida via cfe-commits
@@ -0,0 +1,62 @@ +/// This tests the expected error case when there is a mismatch between the pcm dependencies passed in +/// the command line with `fmodule-file` and whats encoded in the pcm. + +/// The steps are: +/// 1. Build module (A-1) with no dependencies. +/// 2. Build

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

2025-04-21 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/136612 * Report when lookupModuleFile fails and there's an alternate module file to use In an explicit build, the dependency scanner generates invocations with dependencies to module files to use during compilatio

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

2025-04-21 Thread Cyndy Ishida 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] Enable making `CompilerInstance` VFS thread-safe (PR #135737)

2025-04-21 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. 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][deps] Make dependency directives getter thread-safe (PR #136178)

2025-04-18 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM, though you may want to wait a bit longer for someone more familiar to also take a look. https://github.com/llvm/llvm-project/pull/136178 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][deps] Make dependency directives getter thread-safe (PR #136178)

2025-04-18 Thread Cyndy Ishida via cfe-commits
@@ -92,16 +92,10 @@ bool Preprocessor::EnterSourceFile(FileID FID, ConstSearchDirIterator CurDir, } Lexer *TheLexer = new Lexer(FID, *InputFile, *this, IsFirstIncludeOfFile); - if (getPreprocessorOpts().DependencyDirectivesForFile && - FID != PredefinesFileID) { -

[clang] [clang][deps] Make dependency directives getter thread-safe (PR #136178)

2025-04-18 Thread Cyndy Ishida via cfe-commits
@@ -92,16 +92,10 @@ bool Preprocessor::EnterSourceFile(FileID FID, ConstSearchDirIterator CurDir, } Lexer *TheLexer = new Lexer(FID, *InputFile, *this, IsFirstIncludeOfFile); - if (getPreprocessorOpts().DependencyDirectivesForFile && - FID != PredefinesFileID) { -

[clang] [clang][depscan] Centralize logic for populating StableDirs, NFC (PR #135704)

2025-04-15 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/135704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][depscan] Centralize logic for populating StableDirs, NFC (PR #135704)

2025-04-15 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/135704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][tests] Add missing FileCheck check, NFC (PR #135687)

2025-04-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/135687 None >From d105489358661b0cd38b447592ff3e69a5641a7c Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 14 Apr 2025 15:01:45 -0700 Subject: [PATCH] [clang][tests] Add missing FileCheck check, NFC --- c

[clang] [clang][tests] Add missing FileCheck check, NFC (PR #135687)

2025-04-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/135687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][scan-deps] Centralize logic for populating StableDirs, NFC (PR #135704)

2025-04-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/135704 Pass a reference to `StableDirs` when creating ModuleDepCollector. This avoids needing to create one from the same ScanInstance for each call to `handleTopLevelModule` & reduces the amount of potential down

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-10 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > To be clear, this PR is basically cherry-picking > https://github.com/swiftlang/llvm-project/pull/9076 AFAICT that patch special-cased for framework directories while this one disables much more. Is that not the case? https://github.com/llvm/llvm-project/pull/134698

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-10 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: Talked a bit offline, but the patch LGTM, assuming it is purely restoring the previous behavior before https://github.com/llvm/llvm-project/commit/55323ca6c8b9d21d85591f3499b299b62463321f, which would result in performance parity with the release compiler. > I suggest we

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-09 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/134475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-09 Thread Cyndy Ishida via cfe-commits
@@ -5834,13 +5847,27 @@ bool ASTReader::readASTFileControlBlock( break; case INPUT_FILE: bool Overridden = static_cast(Record[3]); - const size_t FilenameAsRequestedLength = Record[7] + 1; - auto ResolvedFilenameAsRequested = Resolv

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/132237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From 3aaaf3371215de0f214836da32f862518f223760 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/3] [clang][DependencyScanning] Track dependencies from preb

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-08 Thread Cyndy Ishida via cfe-commits
@@ -237,6 +237,17 @@ class ASTReaderListener { return true; } + /// Overloaded member function of \c visitInputFile that should + /// be defined when the input file contains both the virtual and external + /// paths, for example when deserializing input files from AST

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From 3aaaf3371215de0f214836da32f862518f223760 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/2] [clang][DependencyScanning] Track dependencies from preb

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-07 Thread Cyndy Ishida via cfe-commits
@@ -6067,14 +6062,21 @@ llvm::Error ASTReader::ReadSubmoduleBlock(ModuleFile &F, if (OptionalFileEntryRef CurFile = CurrentModule->getASTFile()) { // Don't emit module relocation error if we have -fno-validate-pch if (!bool(PP.getPreprocessorOpts().D

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM, a minor non-blocking question. Thank you! https://github.com/llvm/llvm-project/pull/134475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-07 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > This PR temporarily turns off negative directory caching to fix the build > failures. What does temporarily mean here? Is it until the project identified with errors can resolve themselves? Is it until error detection in the build system can catch cases where negative sta

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-04-05 Thread Cyndy Ishida via cfe-commits
@@ -5834,9 +5834,13 @@ bool ASTReader::readASTFileControlBlock( break; case INPUT_FILE: bool Overridden = static_cast(Record[3]); + size_t FilenameLen = ModuleDir.size() + Record[7] + 1; auto Filename = ResolveImportedPath(PathBuf

[clang] [clang][modules] Determine if the SDK supports builtin modules independent of the target (PR #134005)

2025-04-03 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. LGTM. I was a bit worried about the fallout that other target triples using the same sdks would now opt into this behavior but if that were the case they'd already be running into modularization errors (e.g. `found_incompatible_headers

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/132237 When a module is being scanned, it can depend on modules that have already been built from a pch dependency. When this happens, the pcm files are reused for the module dependencies. When this is the case, c

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-26 Thread Cyndy Ishida via cfe-commits
@@ -5834,9 +5834,13 @@ bool ASTReader::readASTFileControlBlock( break; case INPUT_FILE: bool Overridden = static_cast(Record[3]); + size_t FilenameLen = ModuleDir.size() + Record[7] + 1; auto Filename = ResolveImportedPath(PathBuf

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-26 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From ccbcd77e5bd6712531a23bcd79fc9380fdc3d9bf Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/3] [clang][DependencyScanning] Track dependencies from preb

[clang] [clang][DepScan] Allow ModuleDep to be const (PR #132968)

2025-03-25 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/132968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-25 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: ping https://github.com/llvm/llvm-project/pull/132237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DepScan] Allow ModuleDep to be const (PR #132968)

2025-03-25 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/132968 This type can be exposed from C APIs, where instantiations of this type are not expected to mutate after creation. To support this, mark the lazy computation of build arguments mutable, as that is not inten

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-20 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/132237 >From ccbcd77e5bd6712531a23bcd79fc9380fdc3d9bf Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 12 Mar 2025 21:26:36 -0700 Subject: [PATCH 1/2] [clang][DependencyScanning] Track dependencies from preb

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-20 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: >From the previous PR: > This implementation adds some overhead for two reasons. > > It deserializes out more content from prebuilt pcm files. > When a module path is fully realized, it traverses down into the leaf > dependency and updates whether they are in the sysroot. >

[clang] [clang][DepScan] Pass references to ModuleDeps instead of ModuleID in lookupModuleOutput callbacks, NFCI (PR #131688)

2025-03-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/131688 This allows clients to reference more read-only attributes, like IsInStableDirectories. >From 99d2648f4c786e56d1fba51751a418e6858d2f7b Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 11:

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
@@ -739,6 +795,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsShareable) { +

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/130634 >From aca254a154489fda68292f6d06a866ae7011a7f6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 09:06:32 -0700 Subject: [PATCH 1/5] [clang][DependencyScanning] Track modules that resolve f

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
@@ -157,6 +157,32 @@ static void optimizeCWD(CowCompilerInvocation &BuildInvocation, StringRef CWD) { } } +/// Check a subset of invocation options to determine whether the current +/// context can safely be considered as shareable. +static bool areOptionsInSharedDir(CowCom

[clang] [clang][DependencyScanning] Track modules that resolve from "shared" locations (PR #130634)

2025-03-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/130634 ___ 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-15 Thread Cyndy Ishida via cfe-commits
@@ -739,6 +748,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsInSysroot) { +

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

2025-03-15 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/130634 >From aca254a154489fda68292f6d06a866ae7011a7f6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 09:06:32 -0700 Subject: [PATCH 1/2] [clang][DependencyScanning] Track modules that resolve f

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

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -843,7 +864,7 @@ void ModuleDepCollectorPP::addModuleDep( !MDC.isPrebuiltModule(Import)) { cyndyishida wrote: In hindsight, I wish I made this a stacked diff against the real repo. I have an implementation that addresses this in https://github.com/c

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

2025-03-14 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > I have a similar concern to @jansvoboda11 that we probably need to check the > invocation paths as well. > The situation this covers is how likely is it that the build system is going > to determine this needs to be rebuilt, and that happens (in most cases) > purely based

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

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -843,7 +864,7 @@ void ModuleDepCollectorPP::addModuleDep( !MDC.isPrebuiltModule(Import)) { cyndyishida wrote: Added a test for this, modified from the working patch. https://github.com/llvm/llvm-project/pull/130634/files#diff-06c3b647f63ed03628260e6d

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

2025-03-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/130634 >From aca254a154489fda68292f6d06a866ae7011a7f6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 09:06:32 -0700 Subject: [PATCH 1/4] [clang][DependencyScanning] Track modules that resolve f

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

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -739,6 +748,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsInSysroot) { +

  1   2   3   4   5   >