[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida commented: Thank you for cleaning this up!! https://github.com/llvm/llvm-project/pull/120149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-17 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/120149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing Method Parameter Types with the `::` Prefix (PR #119908)

2024-12-17 Thread Cyndy Ishida via cfe-commits
@@ -,8 +,15 @@ bool Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec( } } - if (SS.isEmpty()) + if (SS.isEmpty()) { +if (getLangOpts().ObjC && !getLangOpts().CPlusPlus && cyndyishida wrote: I'm wondering if it's valid for C code to enter

[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-17 Thread Cyndy Ishida via cfe-commits
@@ -150,3 +150,23 @@ clang::parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, StringRef SDKRootPath) { return llvm::make_error("invalid SDKSettings.json", llvm::inconvertibleErrorCode()); } + +// For certain platforms/environments al

[clang] [clang][ObjectiveC] Fix Parsing the `::` Optional Scope Specifier (PR #119908)

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

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-19 Thread Cyndy Ishida via cfe-commits
@@ -2539,6 +2550,18 @@ void DarwinClang::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs llvm::sys::path::append(P, "usr", "include"); addExternCSystemInclude(DriverArgs, CC1Args, P.str()); } + + // Add default framework search paths + auto addFramew

[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)

2024-12-03 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/118543 * Use the centralized API to add `SubFrameworks` for driverkit targets. >From 764bf57ac39fddef74d45d16fffc14035bbbff72 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 3 Dec 2024 11:15:37 -0800 Subjec

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-06 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > Current patch breaks test: > > ``` > // We pass --sysroot="" to defeat any -DDEFAULT_SYSROOT parameter. > ``` > > I think that just a pure hack in the test case, we can just update the test. > @cyndyishida what do you think about the current approach? SGTM too. I don't se

[clang] [Modules] Add `clang/Lex/HLSLRootSignatureTokenKinds.def` to clang's `modulemap` (PR #127839)

2025-02-19 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida approved this pull request. thanks! https://github.com/llvm/llvm-project/pull/127839 ___ 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 Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited 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 Cyndy Ishida 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] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-10 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > This approach becomes a problem when trying to run such tests on a cross-compiling build of clang on a darwin platform. When no darwin targets are included in the build, the tests will still run on a darwin host and fail spuriously because of the missing target. This doesn't

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

2025-03-11 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/130634 That patch tracks whether all the file & module dependencies of a module resolve to a sysroot location. This information will later be queried by build systems for determining where to store the accompanyin

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

2025-03-11 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > 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 command line will likely > refer to unused project-specific source/bui

[clang] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

2025-03-05 Thread Cyndy Ishida via cfe-commits
@@ -1213,11 +1213,17 @@ void GetDependenciesByModuleNameAction::ExecuteAction() { Preprocessor &PP = CI.getPreprocessor(); SourceManager &SM = PP.getSourceManager(); FileID MainFileID = SM.getMainFileID(); - SourceLocation FileStart = SM.getLocForStartOfFile(MainFileID)

[clang] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

2025-03-05 Thread Cyndy Ishida via cfe-commits
@@ -748,17 +751,21 @@ bool DependencyScanningWorker::computeDependencies( InMemoryFS->setCurrentWorkingDirectory(WorkingDirectory); SmallString<128> FakeInputPath; // TODO: We should retry the creation if the path already exists. - llvm::sys::fs::createUniquePath(ModuleN

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

2025-03-13 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/3] [clang][DependencyScanning] Track modules that resolve f

[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
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 "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-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) { +

[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
@@ -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
@@ -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 "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 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
@@ -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][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 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 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][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-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][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-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][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-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][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-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] 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][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] 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][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

<    1   2   3   4