[clang] [clang] Frontend: Destroy compiling compiler instance before read (PR #154455)

2025-08-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/154455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow trivial pp-directives before C++ module directive (PR #153641)

2025-08-17 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/153641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Move Module Timestamp Update After Compilation Finishes (PR #151774)

2025-08-06 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm with or without a test for this specific timing issue. https://github.com/llvm/llvm-project/pull/151774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] Reland [clang][modules-driver] Add scanner to detect C++20 module presence (PR #147630)

2025-07-21 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/147630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Properly capture the global module and '\n' for all module directives (PR #148685)

2025-07-18 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. This looks good to me, but I'd also like @yronglin to take a look since it interacts with their patch. https://github.com/llvm/llvm-project/pull/148685 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang][deps] Properly capture the global module and '\n' for all module directives (PR #148685)

2025-07-16 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. Looks good to me, but I'd also like @akyrtzi to take a look if they have time. https://github.com/llvm/llvm-project/pull/148685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-07-16 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > I have a question, when the input does not meet the restrictions of P1857R3, > do we need to fallback to the old parsing method to perform error recovery? Hmm, that would probably be the most useful. There's not any ambiguity about what the user meant by: ``` import a; ```

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/149059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Recognize 'module;' in dependency directive scanner (PR #148685)

2025-07-14 Thread Michael Spencer via cfe-commits
@@ -1122,16 +1122,17 @@ ort \ )"; ASSERT_FALSE( minimizeSourceToDependencyDirectives(Source, Out, Tokens, Directives)); - EXPECT_STREQ("#include \"textual-header.h\"\nexport module m;" + EXPECT_STREQ("module;#include \"textual-header.h\"\nexport module m;" ---

[clang] [clang][deps] Fix dependency scanner misidentifying 'import::' as module partition (PR #148674)

2025-07-14 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm. https://github.com/llvm/llvm-project/pull/148674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Added partial support for compiling C++20 modules and header-units without scanning. (PR #147682)

2025-07-10 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese commented: This really needs to start with an RFC on https://discourse.llvm.org/ first that covers what you want to do. See https://llvm.org/docs/DeveloperPolicy.html#discuss-the-change-gather-consensus, and you can see examples of other RFCs on discourse for how t

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-07-07 Thread Michael Spencer via cfe-commits
Bigcheese wrote: I'll try to review it this week. https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. With the last bit this looks fine to me, but you should wait for Chuanqi and see if the naming should be changed. https://github.com/llvm/llvm-project/pull/145220 ___ cfe-commits mailing list cf

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,171 @@ +// The driver never checks to implicitly enable the explicit module build +// support unless at least two input files are provided. +// To trigger the C++20 module usage check, we always pass a second dummy file +// as input. +// TODO: Remove -fmodules everywhe

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese edited https://github.com/llvm/llvm-project/pull/145220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Michael Spencer via cfe-commits
@@ -4403,6 +4411,174 @@ void Driver::handleArguments(Compilation &C, DerivedArgList &Args, } } +static void skipWhitespace(const char *&Ptr) { + while (isWhitespace(*Ptr)) +++Ptr; +} + +// Returns the length of EOL, either 0 (no end-of-line), 1 (\n) or 2 (\r\n). +stati

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Michael Spencer via cfe-commits
@@ -577,6 +577,19 @@ def err_drv_reduced_module_output_overrided : Warning< "please consider use '-fmodule-output=' to specify the output file for reduced BMI explicitly">, InGroup>; +def remark_fmodules_driver_enabled : Remark< + "support for explicit module builds enab

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,171 @@ +// The driver never checks to implicitly enable the explicit module build +// support unless at least two input files are provided. +// To trigger the C++20 module usage check, we always pass a second dummy file +// as input. +// TODO: Remove -fmodules everywhe

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-03 Thread Michael Spencer via cfe-commits
@@ -4414,6 +4590,34 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args, handleArguments(C, Args, Inputs, Actions); + if (Args.hasFlag(options::OPT_fmodules_driver, + options::OPT_fno_modules_driver, false)) { +Diags.Report(diag::remark

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/146645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese edited https://github.com/llvm/llvm-project/pull/146645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-03 Thread Michael Spencer via cfe-commits
@@ -880,6 +880,37 @@ TEST(MinimizeSourceToDependencyDirectivesTest, EXPECT_EQ(pp_eof, Directives[22].Kind); } +TEST(MinimizeSourceToDependencyDirectivesTest, + TestFixedBugThatReportUnterminatedDirectiveFalsely) { + SmallVector Out; + SmallVector Tokens; + SmallVector

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-03 Thread Michael Spencer via cfe-commits
@@ -393,7 +393,7 @@ static bool isQuoteCppDigitSeparator(const char *const Start, } void Scanner::skipLine(const char *&First, const char *const End) { Bigcheese wrote: The rule we follow here is that it's ok to miss dependencies as long as the original inp

[clang] [clang] Refactor `LangOptions` to specify AST effect as X macro arg (PR #146766)

2025-07-02 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/146766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules-driver] Add scanner to detect C++20 module presence (PR #145220)

2025-07-01 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > > This PR is part of a series aimed at implementing native support for > > explicit module builds from the Clang driver. > > This is confusing. Since explicit modules is an unrelated term with C++20 > modules. All C++20 named modules builds are done explicitly at the moment

[clang] [clang-scan-deps] Enable test P1689.cppm on Windows (PR #145857)

2025-06-26 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/145857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++][Modules] A module directive may only appear as the first preprocessing tokens in a file (PR #144233)

2025-06-17 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Yes, I'll be able to review it sometime this week. https://github.com/llvm/llvm-project/pull/144233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-13 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > LGTM. I think I would slightly prefer for > `DependencyScanningWorkerFilesystem` to accept the entire service instead of > its members (for the same reasons we do that in the worker, action, etc.) I changed this, although now the tests need a service. I don't think that's a

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-13 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/144000 >From d07ccf298fd3755036ec90e4cd7f1d1408c4506e Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Thu, 12 Jun 2025 17:13:52 -0700 Subject: [PATCH] [clang][scan-deps] Add option to disable caching stat failu

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-13 Thread Michael Spencer via cfe-commits
@@ -1081,7 +1084,8 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { }; DependencyScanningService Service(ScanMode, Format, OptimizeArgs, -EagerLoadModules, /*TraceVFS=*/Verbose); +

[clang] [clang-scan-deps] Implement P2223R2 for DependencyDirectiveScanner.cpp (PR #143950)

2025-06-13 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/143950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-12 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/144000 While the source code isn't supposed to change during a build, in some environments it does. This adds an option that disables caching of stat failures, meaning that source files can be added to the build dur

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-06-09 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > @Bigcheese I have a question about `A module directive may only appear as the > first preprocessing tokens in a file (excluding the global module > fragment.)`. IIUC, as you said in [#90574 > (comment)](https://github.com/llvm/llvm-project/pull/90574#discussion_r1591569547),

[clang] [clang][dep-scan] Resolve lexer crash from a permutation of invalid tokens (PR #142452)

2025-06-06 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/142452 ___ 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-22 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm. I agree this makes the lifetime clearer. https://github.com/llvm/llvm-project/pull/139584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

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

2025-05-14 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm, looks like it keeps the existing semantics. https://github.com/llvm/llvm-project/pull/138983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

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

2025-05-08 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm 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] Mark some language options as benign. (PR #131569)

2025-05-07 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm with Chuanqi's release notes request. Separately, I'd also like to see the rtti and exceptions stuff be marked compatible, although with some testing first of what happens when people do create AST differences with the macros. It's

[clang] [clang] Mark some language options as benign. (PR #131569)

2025-05-07 Thread Michael Spencer via cfe-commits
@@ -398,11 +398,11 @@ BENIGN_LANGOPT(HalfNoSemanticInterposition, 1, 0, "Like -fno-semantic-interposition but don't use local aliases") ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff, "stack protector mode") -ENUM_LANGOPT(TrivialAutoVarIn

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

2025-05-07 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. Just looking at the `missing_textual_header` module alone this is a bit odd, but that's just the semantics of textual headers. Really textual headers just exist to control the non-modular include warning, so this is fine. https://github.

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

2025-05-07 Thread Michael Spencer 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-tools-extra] [lldb] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-05-06 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/132853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reset CodeGenOptions fields for clean module/PCH builds (PR #138256)

2025-05-06 Thread Michael Spencer via cfe-commits
@@ -209,20 +209,21 @@ void ModuleDepCollector::addOutputPaths(CowCompilerInvocation &CI, void dependencies::resetBenignCodeGenOptions(frontend::ActionKind ProgramAction, const LangOptions &LangOpts,

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-04-30 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,127 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// 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-tools-extra] [lldb] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-30 Thread Michael Spencer via cfe-commits
Bigcheese wrote: I believe the Linux test failure was due to a test that should have failed. It had a case insensitive VFS for the headers, but not for the modulemap. When looking up `fw.framework/Modules/module.modulemap` it should fail because that path doesn't exist, and isn't made case ins

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

2025-04-30 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132853 >From cea7c581ff90952d112d912da02de688e09112f7 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 29 Jan 2025 12:49:29 -0800 Subject: [PATCH] [clang][modules] Lazily load by name lookups in module maps

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

2025-04-30 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132853 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

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

2025-04-30 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. Makes sense. Every non-test creation of `CompilerInstance` has an associated invocation. https://github.com/llvm/llvm-project/pull/137668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)

2025-04-30 Thread Michael Spencer via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: Bigcheese wrote: module maps don't get preprocessed, so I don't think it matters what that is set to. For normal module.modulemap files `Preprocessed` is `false`. I think it's fine to remove the true and see if anything breaks

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

2025-04-29 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. I think this looks good overall. I'm a little concerned that the single file and single module names are similar while having quite different semantics, but single file is never actually exposed to users, so they won't be confused. I don

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

2025-04-29 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm 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-04-29 Thread Michael Spencer 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] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/137087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
@@ -322,3 +372,81 @@ void HeaderIncludesJSONCallback::FileSkipped( IncludedHeaders.push_back(SkippedFile.getName().str()); } + +void HeaderIncludesDirectPerFileCallback::EndOfMainFile() { + if (Dependencies.empty()) +return; + + // Sort the files so that the output doe

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese edited https://github.com/llvm/llvm-project/pull/137087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-28 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm. https://github.com/llvm/llvm-project/pull/137087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-04-16 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/136046 Reland https://github.com/llvm/llvm-project/pull/133173. This changes the assembly code to use `.cfi_{start,end}proc` directly in a file scope asm statement and restricts enabling it to MachO to help ensure t

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

2025-04-15 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132853 >From 93fa13d9efabf72032966306473689dfac221857 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 29 Jan 2025 12:49:29 -0800 Subject: [PATCH] [clang][modules] Lazily load by name lookups in module maps

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-15 Thread Michael Spencer via cfe-commits
Bigcheese wrote: And another fix for `!LLVM_ENABLE_THREADS`: 4f64c80d5a23c244f942193e58ecac666c173308 https://github.com/llvm/llvm-project/pull/133173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-15 Thread Michael Spencer via cfe-commits
Bigcheese wrote: I'll have a fix in a sec. https://github.com/llvm/llvm-project/pull/133173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-15 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/133173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-15 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/133173 >From 52b33e2511a2e775e78471fbb2c66ad072369168 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 26 Mar 2025 14:48:19 -0700 Subject: [PATCH] [llvm][clang] Allocate a new stack instead of spawning a new

[clang] [clang][frontend] Make `CompilerInstance::FailedModules` thread-safe (PR #135473)

2025-04-15 Thread Michael Spencer via cfe-commits
@@ -1206,82 +1198,70 @@ createCompilerInstanceForModuleCompileImpl(CompilerInstance &ImportingInstance, DiagnosticOptions &DiagOpts = Invocation->getDiagnosticOpts(); DiagOpts.VerifyDiagnostics = 0; - assert(ImportingInstance.getInvocation().getModuleHash() == -

[clang] [clang][frontend] Make `CompilerInstance::FailedModules` thread-safe (PR #135473)

2025-04-15 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/135473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][frontend] Make `CompilerInstance::FailedModules` thread-safe (PR #135473)

2025-04-14 Thread Michael Spencer via cfe-commits
@@ -1206,82 +1198,70 @@ createCompilerInstanceForModuleCompileImpl(CompilerInstance &ImportingInstance, DiagnosticOptions &DiagOpts = Invocation->getDiagnosticOpts(); DiagOpts.VerifyDiagnostics = 0; - assert(ImportingInstance.getInvocation().getModuleHash() == -

[clang] [clang] Extract `CompilerInstance` creation out of `compileModuleImpl()` (PR #134887)

2025-04-10 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. I believe that's fine to run, it just may build the index again. https://github.com/llvm/llvm-project/pull/134887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang] Extract `CompilerInstance` creation out of `compileModuleImpl()` (PR #134887)

2025-04-10 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Can you not just move the `err_module_rebuild_finalized` diagnostic into `compileModuleImpl`? It has access to everything it needs there. https://github.com/llvm/llvm-project/pull/134887 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-10 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/133173 >From 52b33e2511a2e775e78471fbb2c66ad072369168 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 26 Mar 2025 14:48:19 -0700 Subject: [PATCH] [llvm][clang] Allocate a new stack instead of spawning a new

[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-05 Thread Michael Spencer via cfe-commits
@@ -2128,9 +2245,16 @@ bool ModuleMap::loadModuleMapFile(FileEntryRef File, bool IsSystem, // If the module map file wasn't already entered, do so now. if (ID.isInvalid()) { -auto FileCharacter = -IsSystem ? SrcMgr::C_System_ModuleMap : SrcMgr::C_User_ModuleMa

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-03 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,115 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// 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] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/133173 >From cc251995b3d55b3cd76b0b65753be88c9fb9d627 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 26 Mar 2025 14:48:19 -0700 Subject: [PATCH] [llvm][clang] Allocate a new stack instead of spawning a new

[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132853 >From d19d7c6314dbb68abfe7cdceebd8e8f65aedddc5 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 29 Jan 2025 12:49:29 -0800 Subject: [PATCH] [clang][modules] Lazily load by name lookups in module maps

[clang] [llvm] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132853 >From d19d7c6314dbb68abfe7cdceebd8e8f65aedddc5 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 29 Jan 2025 12:49:29 -0800 Subject: [PATCH 1/2] [clang][modules] Lazily load by name lookups in module

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-03 Thread Michael Spencer via cfe-commits
@@ -52,6 +56,7 @@ else() check_include_file(mach/mach.h HAVE_MACH_MACH_H) check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H) check_include_file(pthread.h HAVE_PTHREAD_H) + check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) Bigcheese wrote: I c

[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-03 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > This now makes much more sense after the renames from the prep-commit. There > are still some naming inconsistencies, though. For example > `ModuleMap::loadModuleMapFile()` both **parses** and loads a module map file, > but `ModuleMap::findOrLoadModule()` expects the module

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-03 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > If split stacks are negatively impacting profiling, debugging, or other > compiler development tasks, I have to ask, have we considered optimizing > clang stack usage? The issue is we will always have this problem with implicitly built modules. It's naturally recursive as w

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-03-27 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,115 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// 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] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-03-26 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,115 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// 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] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-03-26 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/133173 Clang spawns a new thread to avoid running out of stack space. This can make debugging and performance analysis more difficult as how the threads are connected is difficult to recover. This patch introduces

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/132970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/132970 >From 1dca90893cd12709f7d3952b68b552fe93b19c5d Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Tue, 25 Mar 2025 11:14:46 -0700 Subject: [PATCH] [clang] Consistently use "load" to refer to populating clan

[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-03-25 Thread Michael Spencer via cfe-commits
@@ -1801,6 +1801,33 @@ HeaderSearch::loadModuleMapFileImpl(FileEntryRef File, bool IsSystem, return LMM_NewlyLoaded; } +HeaderSearch::LoadModuleMapResult +HeaderSearch::parseModuleMapFileImpl(FileEntryRef File, bool IsSystem, Bigcheese wrote: https://githu

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/132970 Now that we have ModuleMapFile.cpp which parses module maps, it's confusing what ModuleMap::parseModuleMapFile actually does. HeaderSearch already called this loading a module map, so consistently use that te

[clang] [clang-tools-extra] [clang][lex] Store non-owning options ref in `HeaderSearch` (PR #132780)

2025-03-25 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. There's no point in having vague ownership here, so this lgtm. https://github.com/llvm/llvm-project/pull/132780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] 53fa289 - [clang] Remove unused member variable from ModuleMap

2025-03-25 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2025-03-25T10:58:44-07:00 New Revision: 53fa28940e0a3ef183e04dd8bc8566d64bbfd101 URL: https://github.com/llvm/llvm-project/commit/53fa28940e0a3ef183e04dd8bc8566d64bbfd101 DIFF: https://github.com/llvm/llvm-project/commit/53fa28940e0a3ef183e04dd8bc8566d64bbfd101.dif

[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-03-24 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/132853 Instead of eagerly populating the `clang::ModuleMap` when looking up a module by name, this patch changes `HeaderSearch` to only load the modules that are actually used. This introduces `ModuleMap::findOrLoa

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

2025-03-21 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. I think this looks good now. Also nice in general to not mess with options after argument parsing. https://github.com/llvm/llvm-project/pull/130823 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang] Remove deprecated `FileManager` APIs (PR #132063)

2025-03-19 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/132063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Correctly set module map systemness (PR #131940)

2025-03-19 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/131940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Mark some language options as benign. (PR #131569)

2025-03-18 Thread Michael Spencer via cfe-commits
Bigcheese wrote: The general issue with changing this to benign is that it ends up being non-deterministic and buggy for implicitly built modules. I think what we want here is `COMPATIBLE_LANGOPT`. By default it will still feed into the context hash, but the compiler won't reject loading such

[clang-tools-extra] [clangd] [C++20] [Modules] Add modules suffix for 'Header' Source Switch (PR #131591)

2025-03-17 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Is the expectation here that people will name implementation units "foo.cpp" and the corresponding interface unit "foo.cppm"? I guess that's reasonable. https://github.com/llvm/llvm-project/pull/131591 ___ cfe-commits mailing list cfe

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

2025-03-15 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese commented: Overall I think this looks good. I'm not sure I share the same concerns. 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 on the reported dep

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

2025-03-14 Thread Michael Spencer via cfe-commits
@@ -843,7 +864,7 @@ void ModuleDepCollectorPP::addModuleDep( !MDC.isPrebuiltModule(Import)) { Bigcheese wrote: I think that's fine as long as the current patch says that pre built modules means it's not in sysroot, as I think that's a small addition and

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

2025-03-14 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese 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] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-13 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm. 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 Michael Spencer via cfe-commits
https://github.com/Bigcheese edited 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 Michael Spencer via cfe-commits
@@ -0,0 +1,54 @@ +//===--===// +// +// 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] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,54 @@ +//===--===// +// +// 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] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,54 @@ +//===--===// +// +// 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] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese commented: I have a few comments on naming, but overall this looks good. https://github.com/llvm/llvm-project/pull/130989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

  1   2   3   4   >