[clang] Fix the Modules/compiler_builtins.m test (PR #68163)

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

[clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -261,6 +261,11 @@ def err_test_module_file_extension_version : Error< "test module file extension '%0' has different version (%1.%2) than expected " "(%3.%4)">; +def warn_module_build_daemon : Warning<"%0">, + InGroup; +def remark_module_build_daemon : Remark<"%0">, +

[clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,211 @@ +//===- Client.cpp -===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,211 @@ +//===- Client.cpp -===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,211 @@ +//===- Client.cpp -===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,211 @@ +//===- Client.cpp -===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,109 @@ +//===- SocketSupport.cpp --===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,109 @@ +//===- SocketSupport.cpp --===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,128 @@ +//===- SocketSupport.cpp --===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,109 @@ +//===- SocketSupport.cpp --===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,211 @@ +//===- Client.cpp -===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,211 @@ +//===- Client.cpp -===// +// +// 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][MBD] set up module build daemon infrastructure (PR #67562)

2023-10-04 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,302 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// 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] [Modules] no_undeclared_includes modules (Apple Darwin) don't work the clang modules (PR #68241)

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

[clang] [Modules] no_undeclared_includes modules (Apple Darwin) don't work the clang modules (PR #68241)

2023-10-04 Thread Michael Spencer via cfe-commits
Bigcheese wrote: I think splitting out the test here is good. https://github.com/llvm/llvm-project/pull/68241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] d4ded05 - [libunwind][CMake] Treat S files as C to work around CMake bug.

2020-02-20 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2020-02-20T15:26:09-08:00 New Revision: d4ded05ba851304b26a437896bc3962ef56f62cb URL: https://github.com/llvm/llvm-project/commit/d4ded05ba851304b26a437896bc3962ef56f62cb DIFF: https://github.com/llvm/llvm-project/commit/d4ded05ba851304b26a437896bc3962ef56f62cb.dif

Re: r355698 - Re-fix _lrotl/_lrotr to always take Long, no matter the platform.

2020-02-26 Thread Michael Spencer via cfe-commits
I believe this commit is wrong. These intrinsics were originally implemented to support Windows code which expects _lrot{l,r}'s first argument to be 32 bits, it's a breaking change to change these definitions. I'm fine with adding the Intel version of these intrinsics, but you can't just break the

Re: r355698 - Re-fix _lrotl/_lrotr to always take Long, no matter the platform.

2020-02-27 Thread Michael Spencer via cfe-commits
LP64 targets when using -fms-extensions. In the future I would ask that before changing something that has an explicit, documented test like this that you ping the original author for review. - Michael Spencer > > > On Wed, Feb 26, 2020, 5:09 PM Michael Spencer via cfe-commits < > c

[clang] 27a3ece - [clang][Modules] Add -fsystem-module flag

2020-03-03 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2020-03-03T14:14:24-08:00 New Revision: 27a3ecee45584f6e78b4674ebbbe5554faad URL: https://github.com/llvm/llvm-project/commit/27a3ecee45584f6e78b4674ebbbe5554faad DIFF: https://github.com/llvm/llvm-project/commit/27a3ecee45584f6e78b4674ebbbe5554faad.dif

[clang] d8a4ef0 - [clang][clang-scan-deps] Add support for extracting full module dependencies.

2019-10-30 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2019-10-30T14:46:17-07:00 New Revision: d8a4ef0e685cec1fc73d4953b48220b649d05b40 URL: https://github.com/llvm/llvm-project/commit/d8a4ef0e685cec1fc73d4953b48220b649d05b40 DIFF: https://github.com/llvm/llvm-project/commit/d8a4ef0e685cec1fc73d4953b48220b649d05b40.dif

[clang] 1c88d66 - Revert "[clang][clang-scan-deps] Add support for extracting full module dependencies."

2019-10-30 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2019-10-30T15:16:38-07:00 New Revision: 1c88d662230e79bc2dd2283d753d950c1ad0bed6 URL: https://github.com/llvm/llvm-project/commit/1c88d662230e79bc2dd2283d753d950c1ad0bed6 DIFF: https://github.com/llvm/llvm-project/commit/1c88d662230e79bc2dd2283d753d950c1ad0bed6.dif

[clang] 33a745e - [clang][clang-scan-deps] Add support for extracting full module dependencies.

2019-10-30 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2019-10-30T15:27:27-07:00 New Revision: 33a745e6fe7e81d3793f7831d2832aa0785ef327 URL: https://github.com/llvm/llvm-project/commit/33a745e6fe7e81d3793f7831d2832aa0785ef327 DIFF: https://github.com/llvm/llvm-project/commit/33a745e6fe7e81d3793f7831d2832aa0785ef327.dif

[clang] 17b64e3 - [clang][ScanDeps] Fix shadowing warning.

2019-10-30 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2019-10-30T15:53:38-07:00 New Revision: 17b64e36e90ad05a32a99b9f5784b55310cc10e8 URL: https://github.com/llvm/llvm-project/commit/17b64e36e90ad05a32a99b9f5784b55310cc10e8 DIFF: https://github.com/llvm/llvm-project/commit/17b64e36e90ad05a32a99b9f5784b55310cc10e8.dif

Re: [clang] 33a745e - [clang][clang-scan-deps] Add support for extracting full module dependencies.

2019-10-30 Thread Michael Spencer via cfe-commits
fixing the slashes should be easy, but I'm not sure there's a good way to get the PREFIX right. I feel like FileCheck needs an ignore slash direction mode. - Michael Spencer > > On Wed, Oct 30, 2019 at 3:27 PM Michael Spencer via cfe-commits < > cfe-commits@lists.llvm.org

[clang] d816d9b - [clang][ScanDeps] Fix issue with multiple commands with the same input.

2019-10-31 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2019-10-31T14:22:01-07:00 New Revision: d816d9bdc585bbf77a7a1c47a7199fd9e0c34402 URL: https://github.com/llvm/llvm-project/commit/d816d9bdc585bbf77a7a1c47a7199fd9e0c34402 DIFF: https://github.com/llvm/llvm-project/commit/d816d9bdc585bbf77a7a1c47a7199fd9e0c34402.dif

[clang] f978ea4 - [clang][clang-scan-deps] Aggregate the full dependency information.

2019-12-11 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2019-12-11T14:40:51-08:00 New Revision: f978ea498309adaebab8fbf1cd6e520e7e0e11f1 URL: https://github.com/llvm/llvm-project/commit/f978ea498309adaebab8fbf1cd6e520e7e0e11f1 DIFF: https://github.com/llvm/llvm-project/commit/f978ea498309adaebab8fbf1cd6e520e7e0e11f1.dif

Re: [clang] f978ea4 - [clang][clang-scan-deps] Aggregate the full dependency information.

2019-12-11 Thread Michael Spencer via cfe-commits
On Wed, Dec 11, 2019 at 2:41 PM Michael Spencer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > Author: Michael Spencer > Date: 2019-12-11T14:40:51-08:00 > New Revision: f978ea498309adaebab8fbf1cd6e520e7e0e11f1 > > URL: > https://github.c

[clang] 5bcd34a - Revert "[clang][clang-scan-deps] Aggregate the full dependency information."

2019-12-11 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2019-12-11T16:35:55-08:00 New Revision: 5bcd34a03ff343674c106b9a6a0406bf249b9b31 URL: https://github.com/llvm/llvm-project/commit/5bcd34a03ff343674c106b9a6a0406bf249b9b31 DIFF: https://github.com/llvm/llvm-project/commit/5bcd34a03ff343674c106b9a6a0406bf249b9b31.dif

Re: [clang] f978ea4 - [clang][clang-scan-deps] Aggregate the full dependency information.

2019-12-13 Thread Michael Spencer via cfe-commits
a.ibm.com > Cc: cfe-commits@lists.llvm.org > Subject: [EXTERNAL] Re: [clang] f978ea4 - [clang][clang-scan-deps] > Aggregate the full dependency information. > Date: Wed, Dec 11, 2019 7:34 PM > > On Wed, Dec 11, 2019 at 2:41 PM Michael Spencer via cfe-commits < > cfe-commits@l

Re: [clang] f978ea4 - [clang][clang-scan-deps] Aggregate the full dependency information.

2019-12-16 Thread Michael Spencer via cfe-commits
> > Nemanja Ivanovic > LLVM PPC Backend Development > IBM Toronto Lab > Email: neman...@ca.ibm.com > Phone: 905-413-3388 > > > > - Original message - > From: Michael Spencer > To: powerl...@ca.ibm.com > Cc: cfe-commits@lists.llvm.org > Subject: [EXTE

[clang] 16af23f - [clang][Headers] Use __has_builtin instead of _MSC_VER.

2020-03-06 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2020-03-06T13:48:09-08:00 New Revision: 16af23fae8ad2949048e0fc34cf9114dfbe4742a URL: https://github.com/llvm/llvm-project/commit/16af23fae8ad2949048e0fc34cf9114dfbe4742a DIFF: https://github.com/llvm/llvm-project/commit/16af23fae8ad2949048e0fc34cf9114dfbe4742a.dif

[clang] 57c7750 - [clang][DependencyScanner] Cache modulemap stat failures

2023-03-07 Thread Michael Spencer via cfe-commits
Author: Michael Spencer Date: 2023-03-07T15:13:55-08:00 New Revision: 57c7750f703ddee9025f819cdd01c9e97666e7ab URL: https://github.com/llvm/llvm-project/commit/57c7750f703ddee9025f819cdd01c9e97666e7ab DIFF: https://github.com/llvm/llvm-project/commit/57c7750f703ddee9025f819cdd01c9e97666e7ab.dif

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-19 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/82294 It turns out it's not that uncommon for real code to pass a different set of VFSs while building a PCH than while using the PCH. This can cause problems as seen in `test/ClangScanDeps/optimize-vfs-pch.m`. If y

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/82298 Canonicalize `-D` and `-U` flags by sorting them and only keeping the last instance of a given name. This optimization will only fire if all `-D` and `-U` flags start with a simple identifier that we can guar

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-19 Thread Michael Spencer via cfe-commits
@@ -179,6 +179,73 @@ static void sanitizeDiagOpts(DiagnosticOptions &DiagOpts) { DiagOpts.IgnoreWarnings = true; } +// Clang implements -D and -U by splatting text into a predefines buffer. This +// allows constructs such as `-DFඞ=3 "-D F\u{0D9E} 4 3 2”` to be accepted and +

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Michael Spencer via cfe-commits
@@ -65,11 +66,25 @@ static void optimizeHeaderSearchOpts(HeaderSearchOptions &Opts, llvm::DenseSet Visited; std::function VisitMF = [&](const serialization::ModuleFile *MF) { - VFSUsage |= MF->VFSUsage; Visited.insert(MF); - for (co

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > Just to clarify, this patch doesn't attempt to solve the case where Clang can > crash when the VFS overlay files are different between the PCH and the TU, > since that's existing behavior. Correct? Yep, this patch still allows that to happen in cases where it would today. h

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Michael Spencer via cfe-commits
@@ -67,7 +68,7 @@ static bool checkHeaderSearchPaths(const HeaderSearchOptions &HSOpts, if (LangOpts.Modules) { if (HSOpts.VFSOverlayFiles != ExistingHSOpts.VFSOverlayFiles) { if (Diags) { -Diags->Report(diag::err_pch_vfsoverlay_mismatch); +Diags->R

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-20 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/82298 >From b60972ed9183dd9e2deb3860f7732dc87bdfc84e Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Fri, 16 Feb 2024 22:05:25 -0800 Subject: [PATCH] Canonicalize -D and -U flags Canonicalize `-D` and `-U` flag

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-20 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/82298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ScanDeps] Canonicalize -D and -U flags (PR #82298)

2024-02-21 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Weird that it passes on macOS. Also weird that discord doesn't ping about build failures anymore, seems that merging on github now just blames all CI failures on noreply@​github.com. https://github.com/llvm/llvm-project/pull/82298 __

[clang] reland: [clang][ScanDeps] Canonicalize -D and -U flags (PR #82568)

2024-02-21 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/82568 Canonicalize `-D` and `-U` flags by sorting them and only keeping the last instance of a given name. This optimization will only fire if all `-D` and `-U` flags start with a simple identifier that we can guar

[clang] reland: [clang][ScanDeps] Canonicalize -D and -U flags (PR #82568)

2024-02-21 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/82568 >From d8bfbdeedbf0a3bdd2db25e7dd389d6f223091a3 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Fri, 16 Feb 2024 22:05:25 -0800 Subject: [PATCH] [clang][ScanDeps] Canonicalize -D and -U flags Canonicalize

[clang] reland: [clang][ScanDeps] Canonicalize -D and -U flags (PR #82568)

2024-02-21 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Windows didn't like the quoted argument, now let's see if Linux is happy with an unquoted argument. https://github.com/llvm/llvm-project/pull/82568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] reland: [clang][ScanDeps] Canonicalize -D and -U flags (PR #82568)

2024-02-22 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/82568 >From 9759145f34306f1832b1deff0ca1b5e41d2ad89d Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Fri, 16 Feb 2024 22:05:25 -0800 Subject: [PATCH] [clang][ScanDeps] Canonicalize -D and -U flags Canonicalize

[clang] reland: [clang][ScanDeps] Canonicalize -D and -U flags (PR #82568)

2024-02-22 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Try double quotes. https://github.com/llvm/llvm-project/pull/82568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Don't treat ObjC method args as module directives (PR #97654)

2024-07-03 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/97654 `import:(type)name` is a method argument decl in ObjC, but the C++20 preprocessing rules say this is a preprocessing line. Because the dependency directive scanner is not language dependent, this patch extend

[clang] [clang][frontend] Make DumpModuleInfoAction emit the full macro (PR #85745)

2024-04-09 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese requested changes to this pull request. Generally when we get the definition of a macro we loop over the tokens, for example: ```c++ SmallString<128> SpellingBuffer; bool First = true; for (const auto &T : MI.tokens()) { if (!First && T.hasLeadingSpace())

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-09 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese commented: I think the general approach makes sense. I'll take a closer look at the specific changes. https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-09 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese commented: I have a few minor comments on the patch. I want to do some additional perf testing on module scanning perf because I'm a bit concerned about the cost of `ASTWriter::getRawSourceLocationEncoding`. https://github.com/llvm/llvm-project/pull/86912 _

[clang] [Modules] No transitive source location change (PR #86912)

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

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-09 Thread Michael Spencer via cfe-commits
@@ -149,14 +157,44 @@ class SourceLocationSequence::State { operator SourceLocationSequence *() { return &Seq; } }; -inline uint64_t SourceLocationEncoding::encode(SourceLocation Loc, - SourceLocationSequence *Seq) { - return Se

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-09 Thread Michael Spencer via cfe-commits
@@ -4078,8 +4065,8 @@ void ASTReader::ReadModuleOffsetMap(ModuleFile &F) const { return; Bigcheese wrote: There's no more SourceLocation remap so I believe this error message is wrong now. https://github.com/llvm/llvm-project/pull/86912 _

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-09 Thread Michael Spencer via cfe-commits
@@ -149,14 +157,44 @@ class SourceLocationSequence::State { operator SourceLocationSequence *() { return &Seq; } }; -inline uint64_t SourceLocationEncoding::encode(SourceLocation Loc, - SourceLocationSequence *Seq) { - return Se

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-09 Thread Michael Spencer via cfe-commits
@@ -2220,40 +2227,47 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-09 Thread Michael Spencer via cfe-commits
@@ -2220,40 +2227,47 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-09 Thread Michael Spencer via cfe-commits
@@ -2220,40 +2227,47 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [clang][modules] Only compute affecting module maps with implicit search (PR #87849)

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

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,285 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// 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] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,66 @@ +//=== SocketMsgSupport.cpp ===// +// +// 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: Apa

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -71,6 +101,18 @@ ListeningSocket::ListeningSocket(ListeningSocket &&LS) Expected ListeningSocket::createUnix(StringRef SocketPath, int MaxBacklog) { + // Identify instances where the target socket address already exist

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -43,8 +44,7 @@ constexpr size_t SOCKET_ADDR_MAX_LENGTH = sizeof(sockaddr_un::sun_path); constexpr size_t BASEPATH_MAX_LENGTH = SOCKET_ADDR_MAX_LENGTH - SOCKET_FILE_NAME.length(); -// How long should the module build daemon sit ideal before exiting -constexpr int Timeou

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -133,31 +133,42 @@ void ModuleBuildDaemonServer::setupDaemonEnv() { // Creates unix socket for IPC with frontends void ModuleBuildDaemonServer::createDaemonSocket() { - Expected MaybeServerListener = - llvm::ListeningSocket::createUnix(SocketPath); - - if (llvm::Erro

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -237,18 +251,24 @@ int cc1modbuildd_main(ArrayRef Argv) { if (!validBasePathLength(BasePath)) { errs() << "BasePath '" << BasePath << "' is longer then the max length of " << std::to_string(BASEPATH_MAX_LENGTH) << '\n'; -return 1; +return EXIT_FAILUR

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-10 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,278 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// 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][deps] Support single-file mode for all formats (PR #88764)

2024-04-15 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm. Good to get rid of more unneeded differences between ways of doing modules. https://github.com/llvm/llvm-project/pull/88764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [NFC] Parameterize Initialization of `clang::CodeGenerator` on a `TargetInfo` instance which may differ from the one in the `ASTContext` (PR #88977)

2024-04-16 Thread Michael Spencer via cfe-commits
@@ -26,123 +26,132 @@ namespace clang { class VarDecl; class FunctionDecl; class ImportDecl; - -/// ASTConsumer - This is an abstract interface that should be implemented by -/// clients that read ASTs. This abstraction layer allows the client to be -/// independent of t

[clang] [NFC] Parameterize Initialization of `clang::CodeGenerator` on a `TargetInfo` instance which may differ from the one in the `ASTContext` (PR #88977)

2024-04-16 Thread Michael Spencer via cfe-commits
@@ -26,123 +26,132 @@ namespace clang { class VarDecl; class FunctionDecl; class ImportDecl; - -/// ASTConsumer - This is an abstract interface that should be implemented by -/// clients that read ASTs. This abstraction layer allows the client to be -/// independent of t

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

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

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-17 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese commented: Looks about ready to land, just a few comments. https://github.com/llvm/llvm-project/pull/67562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-17 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,289 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// 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] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-17 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,289 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// 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] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-17 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,289 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// 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][support] Implement tracing virtual file system (PR #88326)

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

[clang] [llvm] [llvm][support] Implement tracing virtual file system (PR #88326)

2024-04-17 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm with some comments. https://github.com/llvm/llvm-project/pull/88326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][support] Implement tracing virtual file system (PR #88326)

2024-04-17 Thread Michael Spencer via cfe-commits
@@ -2933,8 +2933,21 @@ recursive_directory_iterator::increment(std::error_code &EC) { return *this; } +void TracingFileSystem::printImpl(raw_ostream &OS, PrintType Type, Bigcheese wrote: Should this print the current stat values? https://github.com/llvm/l

[clang] [llvm] [llvm][support] Implement tracing virtual file system (PR #88326)

2024-04-17 Thread Michael Spencer via cfe-commits
@@ -1125,6 +1125,54 @@ class YAMLVFSWriter { void write(llvm::raw_ostream &OS); }; +/// File system that tracks the number of calls to the underlying file system. +/// This is particularly useful when wrapped around \c RealFileSystem to add +/// lightweight tracking of expen

[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)

2024-04-18 Thread Michael Spencer via cfe-commits
@@ -201,11 +201,8 @@ const CachedRealPath &DependencyScanningFilesystemSharedCache::CacheShard:: return *StoredRealPath; } -static bool shouldCacheStatFailures(StringRef Filename) { - StringRef Ext = llvm::sys::path::extension(Filename); - if (Ext.empty()) -return fal

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-19 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,25 @@ +// Check that a clang invocation can spawn and handshake with a module build daemon + +// RUN: %kill-process "-cc1modbuildd mbd-handshake" +// RUN: rm -rf mbd-handshake %t +// RUN: split-file %s %t + +//--- main.c +int main() {return 0;} + +// RUN: %clang -fmodu

[clang] [clang-scan-deps] Ignore import/include directives with missing filenames (PR #99520)

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

[clang] [clang] Make serialized diagnostics more reliable (PR #100681)

2024-07-25 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/100681 `SDiagsWriter` currently requires clients to call `DiagnosticConsumer::finish()` before it is destroyed if `CompilerInstance::ExecuteAction()` has not been called. The problem with this is that it makes it mu

[clang] [clang] Make serialized diagnostics more reliable (PR #100681)

2024-07-30 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/100681 >From 9d33d58e78f1a7f4253f8e6cb9f8a8f0e3f0375b Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Thu, 25 Jul 2024 18:11:23 -0700 Subject: [PATCH] [clang] Make serialized diagnostics more reliable `SDiagsWr

[clang] [clang] Make serialized diagnostics more reliable (PR #100681)

2024-07-30 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Fixed cc1_main not calling finish with DisableFree. https://github.com/llvm/llvm-project/pull/100681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Don't treat ObjC method args as module directives (PR #97654)

2024-07-17 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/97654 >From b5f39ac8b2ed97e53e13dd71618d8da993a48480 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 10 Jul 2024 17:02:39 -0700 Subject: [PATCH] [clang][deps] Don't treat ObjC method args as module directi

[clang] [clang][deps] Don't treat ObjC method args as module directives (PR #97654)

2024-07-18 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/97654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] Ignore import/include directives with missing filenames (PR #99520)

2024-07-18 Thread Michael Spencer via cfe-commits
@@ -544,7 +544,7 @@ Scanner::lexIncludeFilename(const char *&First, const char *const End) { void Scanner::lexPPDirectiveBody(const char *&First, const char *const End) { while (true) { const dependency_directives_scan::Token &Tok = lexToken(First, End); -if (Tok.is(

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-24 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,289 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// 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] [Modules] No transitive source location change (PR #86912)

2024-04-30 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. I did some testing today and this change seems fine. For scanning modules I actually saw some get smaller with your change. https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailin

[clang] [clang][deps] Don't treat ObjC method args as module directives (PR #97654)

2024-07-11 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/97654 >From 1e8ecb546c3519488050a2c1abe22bb0ecbb8495 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 10 Jul 2024 17:02:39 -0700 Subject: [PATCH] [clang][deps] Don't treat ObjC method args as module directi

[clang] [clang][deps] Don't treat ObjC method args as module directives (PR #97654)

2024-07-11 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Updated the test to be a unit test. https://github.com/llvm/llvm-project/pull/97654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang][modules] stdarg.h and stddef.h shouldn't directly declare anything (PR #90676)

2024-05-02 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese edited https://github.com/llvm/llvm-project/pull/90676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang][modules] stdarg.h and stddef.h shouldn't directly declare anything (PR #90676)

2024-05-02 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese commented: I think I like this as a solution, although I wonder if __stdarg_guard_macro.h would be a better name. The name now somewhat implies that it contains the macros that stddef and stdarg define. https://github.com/llvm/llvm-project/pull/90676 __

[clang] [clang-tools-extra] [llvm] [clang][modules] stdarg.h and stddef.h shouldn't directly declare anything (PR #90676)

2024-05-02 Thread Michael Spencer via cfe-commits
@@ -15,9 +15,11 @@ const HeaderMapCollector::RegexHeaderMap *getSTLPostfixHeaderMap() { static const HeaderMapCollector::RegexHeaderMap STLPostfixHeaderMap = { {"include/__stdarg___gnuc_va_list.h$", ""}, {"include/__stdarg___va_copy.h$", ""}, + {"include/__s

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-06 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > The paper does not clearly says whether disallow function-like macro is also > needed, but I think disallow function-like macro has the same goal as the > paper. WDYT? @cor3ntin @ChuanqiXu9 > > The wording in the paper said: _No identifier in the pp-module-name or > pp-modu

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-06 Thread Michael Spencer via cfe-commits
@@ -1329,6 +1341,129 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name p

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-06 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,87 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -std=c++20 %t/A.cppm -triple x86_64-linux-gnu -verify +// RUN: %clang_cc1 -std=c++20 %t/B.cppm -triple x86_64-linux-gnu -verify +// RUN: %clang_cc1 -std=c++20 %t/C.cppm -triple

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-06 Thread Michael Spencer via cfe-commits
@@ -1329,6 +1341,129 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name p

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-06 Thread Michael Spencer via cfe-commits
@@ -932,6 +932,12 @@ def warn_module_conflict : Warning< InGroup; // C++20 modules +def err_module_decl_cannot_be_macros : Error< + "the name of a module%select{| partition}0 declaration cannot contains " + "an object-like macro %1, and the macro will not expand" + "%sele

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-06 Thread Michael Spencer via cfe-commits
@@ -1329,6 +1341,129 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name p

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-06 Thread Michael Spencer via cfe-commits
@@ -1329,6 +1341,129 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name p

<    1   2   3   4   >