[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-07-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Please add a test for this too. We can use any file ends with `.pcm` to mimic module file in the Driver's test and we can use `CHECK-NOT:` to filter the warning. https://github.com/llvm/llvm-project/pull/99300 __

[clang] [clang][driver][clang-cl] Support `--precompile` and `-fmodule-*` options in Clang-CL (PR #98761)

2024-07-17 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,65 @@ +// REQUIRES: system-windows + +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cl /std:c++20 --precompile "%/t/Hello.cppm" "/Fo%/t/Hello.pcm" ChuanqiXu9 wrote: Maybe something like: ``` // RUN: %clang_cl /std:

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-17 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Given this is approved, I'd like to land this to give it more baking times. I think the current one is reusable as long as the users can be tolerant about the long latency for openning each file. If users want it to be more faster by reusing module files, users can test http

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c184b94 - [C++20] [Modules] Write ODRHash for decls in GMF

2024-07-17 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-07-18T11:42:23+08:00 New Revision: c184b94ff6546c8ba8ac54b5127189427567978f URL: https://github.com/llvm/llvm-project/commit/c184b94ff6546c8ba8ac54b5127189427567978f DIFF: https://github.com/llvm/llvm-project/commit/c184b94ff6546c8ba8ac54b5127189427567978f.diff LO

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

2024-07-17 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-17 Thread Chuanqi Xu via cfe-commits
@@ -3071,6 +3073,45 @@ struct EmbedAnnotationData { /// Registry of pragma handlers added by plugins using PragmaHandlerRegistry = llvm::Registry; +/// Module/Partition name token sequance. +/// +/// module-name: +/// module-name-qualifier[opt] identifier +/// +/

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-18 Thread Chuanqi Xu via cfe-commits
@@ -161,6 +163,7 @@ clang_target_link_libraries(clangDaemon clangAST clangASTMatchers clangBasic + clangDependencyScanning ChuanqiXu9 wrote: It looks like it comes from https://github.com/llvm/llvm-project/blob/b634e057ddecc41dce046887d0f0854fed305374/

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-07-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: No more comments from me. https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang] Split ObjectFilePCHContainerReader from ObjectFilePCHContainerWriter (PR #99599)

2024-07-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/99599 Close https://github.com/llvm/llvm-project/issues/99479 See https://github.com/llvm/llvm-project/issues/99479 for details >From 36e24bd88649e9d5771f1dbb668632d33ffe52d7 Mon Sep 17 00:00:00 2001 From: Chuanqi

[clang] 2f0910d - [C++20] [Modules] Skip ODR checks if either declaration comes from GMF

2024-07-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-07-19T13:38:57+08:00 New Revision: 2f0910d2d74419ef1ebf814b471af721ee78b464 URL: https://github.com/llvm/llvm-project/commit/2f0910d2d74419ef1ebf814b471af721ee78b464 DIFF: https://github.com/llvm/llvm-project/commit/2f0910d2d74419ef1ebf814b471af721ee78b464.diff LO

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-07-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/96453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-23 Thread Chuanqi Xu via cfe-commits
@@ -1523,24 +1442,16 @@ struct SwitchCoroutineSplitter { createResumeEntryBlock(F, Shape); auto *ResumeClone = -createClone(F, ".resume", Shape, CoroCloner::Kind::SwitchResume); +createClone(F, ".resume", Shape, CoroCloner::Kind::SwitchResume, TTI);

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: The higher level idea looks fine. https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-23 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @rjmccall @dwblaikie ping https://github.com/llvm/llvm-project/pull/75912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/89873 Previously, the DeclID is defined in serialization/ASTBitCodes.h under clang::serialization namespace. However, actually the DeclID is not purely used in serialization part. The DeclID is already widely used

[clang] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/89873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/89873 >From d83b9cda6c7d943e90c324fa2c1c7e7ffaf88e1c Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 24 Apr 2024 13:35:01 +0800 Subject: [PATCH] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID

[clang] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-24 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/89873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fe47e8f - [NFC] [ASTUnit] [Serialization] Transalte local decl ID to global decl ID before consuming

2024-04-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-25T15:55:46+08:00 New Revision: fe47e8ff3ae7fc8975eaade6bfa6679737c28b93 URL: https://github.com/llvm/llvm-project/commit/fe47e8ff3ae7fc8975eaade6bfa6679737c28b93 DIFF: https://github.com/llvm/llvm-project/commit/fe47e8ff3ae7fc8975eaade6bfa6679737c28b93.diff LO

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

2024-04-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/86912 >From 2c20a6200fb2790b3a891ffc8c43682c113c7e8a Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 18 Mar 2024 08:36:55 +0800 Subject: [PATCH] [Modules] No transitive source location change --- clang/includ

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

2024-04-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > The changes LGTM, don't want to block this on my remaining nits. Thanks for reviewing this. > > I believe @Bigcheese wanted to test test impact on PCM size on our side > before this lands. I've rebased this with main. I'll wait for the results from @Bigcheese https://gi

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-04-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Given we're pursuing https://github.com/llvm/llvm-project/pull/83237 series. I'll close this one. https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-04-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-04-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/83108 >From be1c83fb885536c3e65657c6549bd20dd29d9649 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 7 Jan 2018 15:16:11 +0200 Subject: [PATCH 1/3] D41416: [modules] [pch] Do not deserialize all lazy temp

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-04-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Rebased with main. https://github.com/llvm/llvm-project/pull/83108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. I have no idea why it was. But the current change looks pretty fine to me. https://github.com/llvm/llvm-project/pull/90298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [llvm] [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (PR #90310)

2024-04-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Feel not bad. https://github.com/llvm/llvm-project/pull/90310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be ``_ZN2NS3fooEv``. Module Initializers ~~~ -All the importable module units are required to emit an initializer function. -The initializer function should contain calls to importing modules fir

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/90237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is st

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -633,36 +630,37 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be ``_ZN2NS3fooEv``. Module Initializers ~~~ -All the importable module units are required to emit an initializer function. -The initializer function should contain calls to importing modules fir

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -8,109 +8,91 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The im

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -400,24 +389,27 @@ And the compilation process for module units are like: mod1.cppm -> clang++ mod1.cppm ... -> mod1.pcm --,--> clang++ mod1.pcm ... -> mod1.o -+ src2.cpp +> clang++ src2.cpp ---> sr

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -216,51 +198,56 @@ We explain the options in the following sections. How to enable standard C++ modules ~~ -Currently, standard C++ modules are enabled automatically -if the language standard is ``-std=c++20`` or newer. +Standard C++ modules

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -8,109 +8,91 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The im

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -925,45 +923,41 @@ In that case, you need to convert your source files (.cpp files) to module imple // Following off should be unchanged. ... -The module implementation unit will import the primary module implicitly. -We don't include any headers in the module implemen

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is st

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Big thanks! I left some comments about correctness or clearness. And all other change looks good to me. https://github.com/llvm/llvm-project/pull/90237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time +performan

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -577,15 +574,16 @@ the generated BMI specified by ``-o`` will be full BMI and the BMI specified by -> ... -> consumer_n.cpp -We don't emit diagnostics if ``-fexperimental-modules-

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be ``_ZN2NS3fooEv``. Module Initializers ~~~ -All the importable module units are required to emit an initializer function. -The initializer function should contain calls to importing modules fir

[clang] 487967a - [Modules] Don't replace local declarations with external declaration with lower visibility

2024-04-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-28T15:23:39+08:00 New Revision: 487967af82053cd08022635a2ff768385d936c80 URL: https://github.com/llvm/llvm-project/commit/487967af82053cd08022635a2ff768385d936c80 DIFF: https://github.com/llvm/llvm-project/commit/487967af82053cd08022635a2ff768385d936c80.diff LO

[clang] 367efa0 - [NFC] [Modules] Avoid scanning the stored decl list twice when replace

2024-04-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-28T18:31:10+08:00 New Revision: 367efa0b0542e6f4171e8c914728946c302ab24b URL: https://github.com/llvm/llvm-project/commit/367efa0b0542e6f4171e8c914728946c302ab24b DIFF: https://github.com/llvm/llvm-project/commit/367efa0b0542e6f4171e8c914728946c302ab24b.diff LO

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-29 Thread Chuanqi Xu via cfe-commits
@@ -1056,6 +1083,25 @@ void CoroCloner::create() { // Set up the new entry block. replaceEntryBlock(); + // Turn symmetric transfers into musttail calls. + for (CallInst *ResumeCall : Shape.SymmetricTransfers) { +ResumeCall = cast(VMap[ResumeCall]); +ResumeCall->

[clang] [Coroutines][Test] Specify target triple in coro-elide-thinlto (PR #90549)

2024-04-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/90549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 38067c5 - [C++20] [Modules] [Reduced BMI] Avoid force writing static declarations

2024-04-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-30T11:34:34+08:00 New Revision: 38067c50a9459caed2892e38b2ae5026a8bff8e2 URL: https://github.com/llvm/llvm-project/commit/38067c50a9459caed2892e38b2ae5026a8bff8e2 DIFF: https://github.com/llvm/llvm-project/commit/38067c50a9459caed2892e38b2ae5026a8bff8e2.diff LO

[clang] 18268ac - [NFC] [C++20] [Modules] Use new class CXX20ModulesGenerator to generate module file for C++20 modules instead of PCHGenerator

2024-04-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-30T13:30:31+08:00 New Revision: 18268ac0f48d93c2bcddb69732761971669c09ab URL: https://github.com/llvm/llvm-project/commit/18268ac0f48d93c2bcddb69732761971669c09ab DIFF: https://github.com/llvm/llvm-project/commit/18268ac0f48d93c2bcddb69732761971669c09ab.diff LO

[clang] fb21343 - [C++20] [Modules] Don't skip pragma diagnostic mappings

2024-04-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-30T13:50:20+08:00 New Revision: fb21343473e33e9a886b42d2fe95d1cec1cd0030 URL: https://github.com/llvm/llvm-project/commit/fb21343473e33e9a886b42d2fe95d1cec1cd0030 DIFF: https://github.com/llvm/llvm-project/commit/fb21343473e33e9a886b42d2fe95d1cec1cd0030.diff LO

[clang] 6b961e2 - Revert "[C++20] [Modules] Don't skip pragma diagnostic mappings"

2024-04-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-30T14:28:11+08:00 New Revision: 6b961e2abfffd8b5a508b5958849b13b0feafa50 URL: https://github.com/llvm/llvm-project/commit/6b961e2abfffd8b5a508b5958849b13b0feafa50 DIFF: https://github.com/llvm/llvm-project/commit/6b961e2abfffd8b5a508b5958849b13b0feafa50.diff LO

[clang] ec527b2 - [C++20] [Modules] Don't skip pragma diagnostic mappings

2024-04-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-30T14:43:57+08:00 New Revision: ec527b21bb4196355184aa95ef31aa561b8e8b7b URL: https://github.com/llvm/llvm-project/commit/ec527b21bb4196355184aa95ef31aa561b8e8b7b DIFF: https://github.com/llvm/llvm-project/commit/ec527b21bb4196355184aa95ef31aa561b8e8b7b.diff LO

[clang] [NFC] [C++20] [Modules] Use new class CXX20ModulesGenerator to genera… (PR #90570)

2024-04-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/90570 …te module file for C++20 modules instead of PCHGenerator Previously we're re-using PCHGenerator to generate the module file for C++20 modules. But this is slighty more or less odd. This patch tries to use a

[clang] [NFC] [C++20] [Modules] Use new class CXX20ModulesGenerator to genera… (PR #90570)

2024-04-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/90570 ___ 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-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed 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] [NFC] [C++20] [Modules] Use new class CXX20ModulesGenerator to genera… (PR #90570)

2024-04-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: The test failure looks no related. I'll commit this after formatted. https://github.com/llvm/llvm-project/pull/90570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b2b463b - [C++20] [Modules] Add signature to the BMI recording export imported

2024-04-30 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-30T16:33:34+08:00 New Revision: b2b463bd8f6b21f040b80c4493682cf74f8dced5 URL: https://github.com/llvm/llvm-project/commit/b2b463bd8f6b21f040b80c4493682cf74f8dced5 DIFF: https://github.com/llvm/llvm-project/commit/b2b463bd8f6b21f040b80c4493682cf74f8dced5.diff LO

[clang] [NFC] [C++20] [Modules] Use new class CXX20ModulesGenerator to genera… (PR #90570)

2024-04-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/90570 >From d73596affed67978c703c92789de045e9ebf0f6b Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 30 Apr 2024 13:28:52 +0800 Subject: [PATCH] [NFC] [C++20] [Modules] Use new class CXX20ModulesGenerator to g

[clang] [NFC] [C++20] [Modules] Use new class CXX20ModulesGenerator to genera… (PR #90570)

2024-04-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/90570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 10aab63 - [NFC] [tests] Don't try to remove and create the same directory

2024-04-30 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-30T17:08:40+08:00 New Revision: 10aab63c9cb49d3ddfbe2cf8992de433efeef6f1 URL: https://github.com/llvm/llvm-project/commit/10aab63c9cb49d3ddfbe2cf8992de433efeef6f1 DIFF: https://github.com/llvm/llvm-project/commit/10aab63c9cb49d3ddfbe2cf8992de433efeef6f1.diff LO

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

2024-04-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: LGTM otherwise. I'd like to leave this to @cor3ntin https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

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

2024-04-30 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -triple x86_64-linux-gnu -DTEST=1 -verify +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -triple x86_64-linux-gnu -DTEST=2 -verify + +module; +export module x; +#include "version.h" +#if TEST ==

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

2024-04-30 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -triple x86_64-linux-gnu -DTEST=1 -verify +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %s -triple x86_64-linux-gnu -DTEST=2 -verify + +module; +export module x; +#include "version.h" +#if TEST ==

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

2024-04-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I strongly suspect that this patch badly broke the [Solaris/sparcv9 > buildbot](https://lab.llvm.org/buildbot/#/builders/72/builds/4046): it > introduced more than 1000 failures. > > Please fix or revert. I'll revert this. Due to I can't reproduce this. When the bot gets s

[clang] d333a0d - Revert "[Modules] No transitive source location change (#86912)"

2024-04-30 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-30T22:32:02+08:00 New Revision: d333a0de6829616427182b26923b14d779ce1dbb URL: https://github.com/llvm/llvm-project/commit/d333a0de6829616427182b26923b14d779ce1dbb DIFF: https://github.com/llvm/llvm-project/commit/d333a0de6829616427182b26923b14d779ce1dbb.diff LO

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

2024-04-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > I'll revert this. Due to I can't reproduce this. When the bot gets stable, > > please tell if it is the real problem. > > You can reproduce this: the [GCC compile farm](https://portal.cfarm.net/) > does have a Solaris/sparcv9 system (`cfarm215`) which is perfectly equippe

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

2024-04-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Oh, maybe I found the reason. It is because my patch breaks the alignments of `DeclOffset`: https://github.com/llvm/llvm-project/blob/8d28e5861f8b117a547850ffbb9a332aa6e91459/clang/include/clang/Serialization/ASTBitCodes.h#L237-L240 then it explains why it work well in some p

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

2024-04-30 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 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-mod

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Quick update, all clang/cxx-library tests pass with the change but when I > test it on my real project with modules I see crash or assert in > [ASTDeclMerger::MergeDefinitionData](https://github.com/llvm/llvm-project/blob/main/clang/lib/Serialization/ASTReaderDecl.cpp#L2081)

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-28 Thread Chuanqi Xu via cfe-commits
@@ -523,6 +523,12 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { NormalCleanupDest = Address::invalid(); } + if (getLangOpts().Coroutines && isCoroutine()) { +auto *Record = FnRetTy->getAsCXXRecordDecl(); +if (Record && Record->hasAttr()) +

[clang] 07514fa - [Coroutines] Salvage the debug information for coroutine frames within optimizations

2024-08-28 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-08-28T17:02:12+08:00 New Revision: 07514fa9b607fd80a72a80270d714e22d842fa39 URL: https://github.com/llvm/llvm-project/commit/07514fa9b607fd80a72a80270d714e22d842fa39 DIFF: https://github.com/llvm/llvm-project/commit/07514fa9b607fd80a72a80270d714e22d842fa39.diff LO

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: LGTM, except the CodeGen's change. I am still slightly concerned about the maintainability. Let's try to give @efriedma-quic another two weeks. https://github.com/llvm/llvm-project/pull/99282 ___ cfe-commits ma

[clang] [C++20] [Modules] Merge lambdas in source to imported lambdas (PR #106483)

2024-08-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/106483 Close https://github.com/llvm/llvm-project/issues/102721 Generally, the type of merged decls will be reused in ASTContext. But for lambda, in the import and then include case, we can't decide its previous

[clang] [C++20] [Modules] Merge lambdas in source to imported lambdas (PR #106483)

2024-08-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/106483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Merge lambdas in source to imported lambdas (PR #106483)

2024-08-28 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I don't think this patch is related to `Posix/fork_threaded.c` in compiler-rt. https://github.com/llvm/llvm-project/pull/106483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/106501 Close https://github.com/llvm/llvm-project/issues/102933 The root cause of the issue is an oversight in https://github.com/llvm/llvm-project/pull/102287 that I didn't notice that PendingEmittingVTables shoul

[clang] [CodeGen] Apply 'readonly' to 'this' pointer argument. (PR #106499)

2024-08-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Sounds good to me and I add another few reviewers to take another look. https://github.com/llvm/llvm-project/pull/106499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/106501 >From b5bb3c27c13f1d0f6af21e5f7d8fdad3727bf2d0 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 29 Aug 2024 14:40:50 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Don't insert class not in named modules t

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/102444 >From 4777ed31ebf1d631c394cd8f13a9355d177536d0 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 8 Aug 2024 15:30:35 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Embed all source files for C++20 Modules

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/106501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 milestoned https://github.com/llvm/llvm-project/pull/106501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Don't insert class not in named modules to PendingEmittingVTables (PR #106501)

2024-08-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick 47615ff2347a8be429404285de3b1c03b411e7af https://github.com/llvm/llvm-project/pull/106501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/102444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Was this discussed/reviewed/motivated? There are drawbacks to this approach > outlined in #72383 > > @iains @jyknight @AaronBallman @Bigcheese The motivation is in https://github.com/llvm/llvm-project/issues/72383 and I comment in https://github.com/llvm/llvm-project/issu

[clang] [CodeGen] Apply 'readonly' to 'this' pointer argument. (PR #106499)

2024-08-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I'm very confused. `readonly` means that the memory behind `this` cannot be > changed, not that the pointer cannot be changed. Out of curiosity, it looks not same in https://llvm.org/docs/LangRef.html: > This attribute indicates that the function does not write through this

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-08-29 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > > Was this discussed/reviewed/motivated? There are drawbacks to this > > > approach outlined in #72383 > > > @iains @jyknight @AaronBallman @Bigcheese > > > > > > The motivation is in #72383 and I comment in [#72383 > > (comment)](https://github.com/llvm/llvm-project/iss

[clang] ca2351d - [C++20] [Modules] Skip checking ODR for merged context in GMF

2024-08-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-08-30T11:45:01+08:00 New Revision: ca2351dd142bac574021f48f135a9f9383c41128 URL: https://github.com/llvm/llvm-project/commit/ca2351dd142bac574021f48f135a9f9383c41128 DIFF: https://github.com/llvm/llvm-project/commit/ca2351dd142bac574021f48f135a9f9383c41128.diff LO

[clang-tools-extra] 448d8fa - [NFC] [clangd] [Modules] Extract ModuleFile class and IsModuleFileUpToDate function

2024-08-29 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-08-30T14:43:41+08:00 New Revision: 448d8fa880be5cae0f63c3b248f07f647013a5a4 URL: https://github.com/llvm/llvm-project/commit/448d8fa880be5cae0f63c3b248f07f647013a5a4 DIFF: https://github.com/llvm/llvm-project/commit/448d8fa880be5cae0f63c3b248f07f647013a5a4.diff LO

[clang-tools-extra] d68059b - [NFC] [clangd] [Modules] Change the argument type of IsModuleFileUpToDate to reference

2024-08-30 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-08-30T15:15:24+08:00 New Revision: d68059bcfd1cc27e378c43b1f16019c5baccb06d URL: https://github.com/llvm/llvm-project/commit/d68059bcfd1cc27e378c43b1f16019c5baccb06d DIFF: https://github.com/llvm/llvm-project/commit/d68059bcfd1cc27e378c43b1f16019c5baccb06d.diff LO

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-08-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/106683 This is the following patch of https://github.com/llvm/llvm-project/pull/66462 to optimize its performance. # Motivation To avoid data races, we choose "per file owns its dependent modules" model. That sa

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-08-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/106683 >From facbe53b41f90d2b7c94d83aaaec03f83f355735 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 30 Aug 2024 15:11:07 +0800 Subject: [PATCH] [clangd] [Modules] Support Reusable Modules Builder --- clang-

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-02 Thread Chuanqi Xu via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee Message-ID: In-Reply-To: ChuanqiXu9 wrote: > > I am curious about your real project, is it open source? > > Unfortunately, it is not an open source project but we use bunch of OSS > libraries like Folly, Thrift and many other so I see

[clang] 2cbd1bc - Revert "[C++20] [Modules] Embed all source files for C++20 Modules (#102444)"

2024-09-02 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-09-03T10:54:20+08:00 New Revision: 2cbd1bc830861bc08f78fb6cc11747b82f66c4c6 URL: https://github.com/llvm/llvm-project/commit/2cbd1bc830861bc08f78fb6cc11747b82f66c4c6 DIFF: https://github.com/llvm/llvm-project/commit/2cbd1bc830861bc08f78fb6cc11747b82f66c4c6.diff LO

[clang] [C++20] [Modules] Embed all source files for C++20 Modules (PR #102444)

2024-09-02 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Thanks for the write-up. I've reverted and I'll try to open a RFC to get a wider discussion. https://github.com/llvm/llvm-project/pull/102444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

<    10   11   12   13   14   15   16   17   18   19   >