#
88a720d1 |
| 16-May-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[NFC] [C++20] [Modules] Rename ASTContext::getNamedModuleForCodeGen to ASTContext::getCurrentNamedModule
The original name "ASTContext::getNamedModuleForCodeGen" is not properly reflecting the usage
[NFC] [C++20] [Modules] Rename ASTContext::getNamedModuleForCodeGen to ASTContext::getCurrentNamedModule
The original name "ASTContext::getNamedModuleForCodeGen" is not properly reflecting the usage of the interface. This interface can be used to judge the current module unit in both sema analysis and code generation. So the original name was not so correct.
show more ...
|
#
7f370669 |
| 16-May-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
Revert "[NFC] [C++20] [Modules] Refactor Sema::isModuleUnitOfCurrentTU into"
This reverts commit f109b1016801e2b0dbee278f3c517057c0b1d441 as required in https://github.com/llvm/llvm-project/commit/f
Revert "[NFC] [C++20] [Modules] Refactor Sema::isModuleUnitOfCurrentTU into"
This reverts commit f109b1016801e2b0dbee278f3c517057c0b1d441 as required in https://github.com/llvm/llvm-project/commit/f109b1016801e2b0dbee278f3c517057c0b1d441#commitcomment-113477829.
show more ...
|
#
f109b101 |
| 10-May-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[NFC] [C++20] [Modules] Refactor Sema::isModuleUnitOfCurrentTU into Decl::isInCurrentModuleUnit
Refactor `Sema::isModuleUnitOfCurrentTU` to `Decl::isInCurrentModuleUnit` to make code simpler a littl
[NFC] [C++20] [Modules] Refactor Sema::isModuleUnitOfCurrentTU into Decl::isInCurrentModuleUnit
Refactor `Sema::isModuleUnitOfCurrentTU` to `Decl::isInCurrentModuleUnit` to make code simpler a little bit. Note that although this patch introduces a FIXME, this is an existing issue and this patch just tries to describe it explicitly.
show more ...
|
Revision tags: llvmorg-16.0.3 |
|
#
ba15d186 |
| 30-Apr-2023 |
Mark de Wever <koraq@xs4all.nl> |
[clang] Use -std=c++23 instead of -std=c++2b
During the ISO C++ Committee meeting plenary session the C++23 Standard has been voted as technical complete.
This updates the reference to c++2b to c++
[clang] Use -std=c++23 instead of -std=c++2b
During the ISO C++ Committee meeting plenary session the C++23 Standard has been voted as technical complete.
This updates the reference to c++2b to c++23 and updates the __cplusplus macro.
Drive-by fixes c++1z -> c++17 and c++2a -> c++20 when seen.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D149553
show more ...
|
Revision tags: llvmorg-16.0.2 |
|
#
c1f76363 |
| 13-Apr-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[C++20] [Modules] Continue parsing after we found reserved module names
Close https://github.com/llvm/llvm-project/issues/62112
In the previous change, we'll stop parsing directly after we found re
[C++20] [Modules] Continue parsing after we found reserved module names
Close https://github.com/llvm/llvm-project/issues/62112
In the previous change, we'll stop parsing directly after we found reserved module names. But this may be too aggressive. This patch changes this. Note that the parsing will still be stopped if the module name is `module` or `import`.
show more ...
|
Revision tags: llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5 |
|
#
6e4f870a |
| 03-Jun-2022 |
Iain Sandoe <iain@sandoe.co.uk> |
re-land [C++20][Modules] Introduce an implementation module.
We need to be able to distinguish individual TUs from the same module in cases where TU-local entities either need to be hidden (or, for
re-land [C++20][Modules] Introduce an implementation module.
We need to be able to distinguish individual TUs from the same module in cases where TU-local entities either need to be hidden (or, for some cases of ADL in template instantiation, need to be detected as exposures).
This creates a module type for the implementation which implicitly imports its primary module interface per C++20: [module.unit/8] 'A module-declaration that contains neither an export-keyword nor a module-partition implicitly imports the primary module interface unit of the module as if by a module-import-declaration.
Implementation modules are never serialized (-emit-module-interface for an implementation unit is diagnosed and rejected).
Differential Revision: https://reviews.llvm.org/D126959
show more ...
|
#
e574833c |
| 28-Mar-2023 |
Aaron Ballman <aaron@aaronballman.com> |
Downgrade reserved module identifier error into a warning
Any project that wants to import std; potentially needs to be able to build a module that does export std;. We silenced the error diagnostic
Downgrade reserved module identifier error into a warning
Any project that wants to import std; potentially needs to be able to build a module that does export std;. We silenced the error diagnostic if the module identified itself as a system header, but this isn't quite good enough, what we really need is a way to identify a system module. It would be nice for that feature to be shared among the major implementations, so this downgrades the diagnostic from an error to a warning temporarily to give implementers time to determine what that mechanism will look like. We may convert this warning back into an error in a future release of Clang, but it's not guaranteed we will do so.
Fixes https://github.com/llvm/llvm-project/issues/61446 Differential Revision: https://reviews.llvm.org/D146986
show more ...
|
#
074f6fd6 |
| 27-Mar-2023 |
Mitch Phillips <31459023+hctim@users.noreply.github.com> |
Revert "[C++20][Modules] Introduce an implementation module."
This reverts commit c6e9823724ef6bdfee262289ee34d162db436af0.
Reason: Broke the ASan buildbots, see https://reviews.llvm.org/D126959 (t
Revert "[C++20][Modules] Introduce an implementation module."
This reverts commit c6e9823724ef6bdfee262289ee34d162db436af0.
Reason: Broke the ASan buildbots, see https://reviews.llvm.org/D126959 (the original phabricator review) for more info.
show more ...
|
#
c6e98237 |
| 03-Jun-2022 |
Iain Sandoe <iain@sandoe.co.uk> |
[C++20][Modules] Introduce an implementation module.
We need to be able to distinguish individual TUs from the same module in cases where TU-local entities either need to be hidden (or, for some cas
[C++20][Modules] Introduce an implementation module.
We need to be able to distinguish individual TUs from the same module in cases where TU-local entities either need to be hidden (or, for some cases of ADL in template instantiation, need to be detected as exposures).
This creates a module type for the implementation which implicitly imports its primary module interface per C++20: [module.unit/8] 'A module-declaration that contains neither an export-keyword nor a module-partition implicitly imports the primary module interface unit of the module as if by a module-import-declaration.
Implementation modules are never serialized (-emit-module-interface for an implementation unit is diagnosed and rejected).
Differential Revision: https://reviews.llvm.org/D126959
show more ...
|
#
bf52ead2 |
| 03-Mar-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[C++20] [Modules] Support to export declarations in language linkage
Close https://github.com/llvm/llvm-project/issues/60405
See the discussion in the above link for the background.
What the patch
[C++20] [Modules] Support to export declarations in language linkage
Close https://github.com/llvm/llvm-project/issues/60405
See the discussion in the above link for the background.
What the patch does: - Rename `Module::ModuleKind::GlobalModuleFragment` to `Module::ModuleKind::ExplicitGlobalModuleFragment`. - Add another module kind `ImplicitGlobalModuleFragment` to `ModuleKind`. - Create an implicit global module fragment for the language linkage declarations inside a module purview. - If the language linkage lives inside the scope of an export decl, the created modules is marked as exported to outer modules. - In fact, Sema will only create at most 2 implicit global module fragments to avoid creating a lot of unnecessary modules in the edging case.
Reviewed By: iains
Differential Revision: https://reviews.llvm.org/D144367
show more ...
|
#
2dfa957f |
| 20-Feb-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[NFC] Remove the unused parameter in Sema::PushGlobalModuleFragment
The `IsImplicit` parameter should be removed since it is not used now.
|
#
70d78e03 |
| 20-Feb-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[NFC] Remove unused Sema::DirectModuleImports
Sema::DirectModuleImports is not used now. Remove it for clearness.
|
#
999ead9d |
| 16-Feb-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[Modules] Code cleanup after removing ModulesTS
Some codes become unused after we remove ModulesTS.
|
#
612f3ac2 |
| 15-Feb-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[Modules] Remove -fmodules-ts
As the diagnostic message shows, we should remove -fmodules-ts flag in clang/llvm17. Since clang/llvm16 is already branched. We can remove the depreacared flag now.
|
#
24ecd998 |
| 13-Feb-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[NFC] Set C++20 Named Modules for CodeGen in ASTContext in the early place
Previously we'll set the named modules for ASTContext in ParseAST. But this is not intuitive and we need comments to tell t
[NFC] Set C++20 Named Modules for CodeGen in ASTContext in the early place
Previously we'll set the named modules for ASTContext in ParseAST. But this is not intuitive and we need comments to tell the intuition. This patch moves the code the right the place, where the corrresponding module is first created/loaded. Now it is more intuitive and we can use the value in the earlier places.
show more ...
|
#
1782e8f9 |
| 08-Feb-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[C++20] [Modules] Allow -fmodule-file=<module-name>=<BMI-Path> for implementation unit and document the behavior
Close https://github.com/llvm/llvm-project/issues/57293.
Previsouly we can't use `-f
[C++20] [Modules] Allow -fmodule-file=<module-name>=<BMI-Path> for implementation unit and document the behavior
Close https://github.com/llvm/llvm-project/issues/57293.
Previsouly we can't use `-fmodule-file=<module-name>=<BMI-Path>` for implementation units, it is a bug. Also the behavior of the above option is not tested nor documented for C++20 Modules. This patch addresses the 2 problems.
show more ...
|
#
53a1314e |
| 13-Dec-2022 |
Iain Sandoe <iain@sandoe.co.uk> |
[C++20][Modules] Fix named module import diagnostics.
We have been incorrectly disallowing imports of named modules in the global and private module fragments.
This addresses: https://github.com/ll
[C++20][Modules] Fix named module import diagnostics.
We have been incorrectly disallowing imports of named modules in the global and private module fragments.
This addresses: https://github.com/llvm/llvm-project/issues/59688
Differential Revision: https://reviews.llvm.org/D140927
show more ...
|
#
c3efd527 |
| 20-Jan-2023 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][modules] Disallow importing private framework in the implementation
Whenever we are compiling implementation of a framework (with the `-fmodule-name=FW` option), we never translate `#import
[clang][modules] Disallow importing private framework in the implementation
Whenever we are compiling implementation of a framework (with the `-fmodule-name=FW` option), we never translate `#import <FW/Header.h>` to an import, regardless of whether "Header.h" belongs to "FW" or "FW_Private". For the same reasons, we also disallow `@import FW`. However, we still allow `@import FW_Private`. This patch disallows that a well, to be consistent with the rest of the rules.
Reviewed By: benlangmuir
Differential Revision: https://reviews.llvm.org/D142167
show more ...
|
#
75fbb5d2 |
| 18-Jan-2023 |
Richard Howell <rhow@fb.com> |
[clang][nfc] refactor Module::Header to use OptionalFileEntryRef
Refactor the `Module::Header` class to use an `OptionalFileEntryRef` instead of a `FileEntry*`. This is preparation for refactoring t
[clang][nfc] refactor Module::Header to use OptionalFileEntryRef
Refactor the `Module::Header` class to use an `OptionalFileEntryRef` instead of a `FileEntry*`. This is preparation for refactoring the `TopHeaderNames` to use `FileEntryRef` so that we preserve the lookup path of the headers when serializing.
This is mostly based on https://reviews.llvm.org/D90497
Reviewed By: jansvoboda11
Differential Revision: https://reviews.llvm.org/D142113
show more ...
|
#
6ad0788c |
| 14-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[clang] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to remove #include "llvm/ADT/Optional.h".
This is p
[clang] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to remove #include "llvm/ADT/Optional.h".
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
#
a1580d7b |
| 14-Jan-2023 |
Kazu Hirata <kazu@google.com> |
[clang] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Option
[clang] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Optional with std::optional.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
#
854c10f8 |
| 19-Dec-2022 |
Benjamin Kramer <benny.kra@googlemail.com> |
[Clang] Prepare for llvm::Optional becoming std::optional.
The needed tweaks are mostly trivial, the one nasty bit is Clang's usage of OptionalStorage. To keep this working old Optional stays around
[Clang] Prepare for llvm::Optional becoming std::optional.
The needed tweaks are mostly trivial, the one nasty bit is Clang's usage of OptionalStorage. To keep this working old Optional stays around as clang::CustomizableOptional, with the default Storage removed. Optional<File/DirectoryEntryRef> is replaced with a typedef.
I tested this with GCC 7.5, the oldest supported GCC I had around.
Differential Revision: https://reviews.llvm.org/D140332
show more ...
|
#
205c0589 |
| 18-Dec-2022 |
Krzysztof Parzyszek <kparzysz@quicinc.com> |
Revert "[clang] Convert OptionalFileEntryRefDegradesToFileEntryPtr to std::optional"
This reverts commit 8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.
The Optional*RefDegradesTo*EntryPtr types want to
Revert "[clang] Convert OptionalFileEntryRefDegradesToFileEntryPtr to std::optional"
This reverts commit 8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.
The Optional*RefDegradesTo*EntryPtr types want to keep the same size as the underlying type, which std::optional doesn't guarantee. For use with llvm::Optional, they define their own storage class, and there is no way to do that in std::optional.
On top of that, that commit broke builds with older GCCs, where std::optional was not trivially copyable (static_assert in the clang sources was failing).
show more ...
|
#
8f0df9f3 |
| 17-Dec-2022 |
Krzysztof Parzyszek <kparzysz@quicinc.com> |
[clang] Convert OptionalFileEntryRefDegradesToFileEntryPtr to std::optional
|
#
8595f2e5 |
| 03-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[Sema] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of ma
[Sema] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|