#
92491295 |
| 26-May-2023 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][modules] NFCI: Distinguish as-written and effective umbrella directories
For modules with umbrellas, we track how they were written in the module map. Unfortunately, the getter for the umbre
[clang][modules] NFCI: Distinguish as-written and effective umbrella directories
For modules with umbrellas, we track how they were written in the module map. Unfortunately, the getter for the umbrella directory conflates the "as written" directory and the "effective" directory (either the written one or the parent of the written umbrella header).
This patch makes the distinction between "as written" and "effective" umbrella directories clearer. No functional change intended.
Reviewed By: benlangmuir
Differential Revision: https://reviews.llvm.org/D151581
show more ...
|
#
53c03a3d |
| 17-May-2023 |
Jonas Hahnfeld <jonas.hahnfeld@cern.ch> |
[clang][modules] Add features for recent C++ versions
Add cplusplus20, cplusplus23, and cplusplus26 (but don't document the latter, following the current policy).
Differential Revision: https://rev
[clang][modules] Add features for recent C++ versions
Add cplusplus20, cplusplus23, and cplusplus26 (but don't document the latter, following the current policy).
Differential Revision: https://reviews.llvm.org/D150773
show more ...
|
Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2 |
|
#
40136ece |
| 18-Apr-2023 |
Stoorx <me@stoorx.one> |
[clang] Make access to submodules via `iterator_range`
In file `clang/lib/Basic/Module.cpp` the `Module` class had `submodule_begin()` and `submodule_end()` functions to retrieve corresponding itera
[clang] Make access to submodules via `iterator_range`
In file `clang/lib/Basic/Module.cpp` the `Module` class had `submodule_begin()` and `submodule_end()` functions to retrieve corresponding iterators for private vector of Modules. This commit removes mentioned functions, and replaces all of theirs usages with `submodules()` function and range-based for-loops.
Differential Revision: https://reviews.llvm.org/D148954
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 |
|
#
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 ...
|
Revision tags: llvmorg-15.0.7 |
|
#
a3c248db |
| 06-Jan-2023 |
serge-sans-paille <sguelton@mozilla.com> |
Move from llvm::makeArrayRef to ArrayRef deduction guides - clang/ part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential
Move from llvm::makeArrayRef to ArrayRef deduction guides - clang/ part
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files.
Differential Revision: https://reviews.llvm.org/D141139
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5 |
|
#
cb2289f3 |
| 15-Nov-2022 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[C++20] [Modules] Attach implicitly declared allocation funcitons to global module fragment
[basic.stc.dynamic.general]p2 says: > The library provides default definitions for the global allocation >
[C++20] [Modules] Attach implicitly declared allocation funcitons to global module fragment
[basic.stc.dynamic.general]p2 says: > The library provides default definitions for the global allocation > and deallocation functions. Some global allocation and > deallocation > functions are replaceable ([new.delete]); these are attached to > the global module ([module.unit]).
But we didn't take this before and the implicitly generated functions will live in the module purview if we're compiling a module unit. This is bad since the owning module will affect the linkage of the declarations. This patch addresses this.
Closes https://github.com/llvm/llvm-project/issues/58560
show more ...
|
Revision tags: llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0 |
|
#
245da0a4 |
| 01-Sep-2022 |
Nathan Sidwell <nathan@acm.org> |
[modules] Fix callback argument thinko
VisbleModuleSet::setVisible takes a callback, to inform of modules being made (transitively) visible. However, we were calling it as 'Vis(M)' from a recursive
[modules] Fix callback argument thinko
VisbleModuleSet::setVisible takes a callback, to inform of modules being made (transitively) visible. However, we were calling it as 'Vis(M)' from a recursive lambda, where 'M' is a capture of setVisible's M, module parameter. Thus we can invoke the callback multiple times, passing the same value to it each time.
Everywhere else in the lambda, we refer to V.M of the lambda's Visiting parameter. We should be doing so for the callback. Thus we'll pass the outermost module on the outermost recursive call, and as we descend the imports, we'll pass each import to the callback.
Reviewed By: iains
Differential Revision: https://reviews.llvm.org/D135958
show more ...
|
Revision tags: 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, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3 |
|
#
b45888e9 |
| 07-Mar-2022 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][modules] Report module maps affecting `no_undeclared_includes` modules
Since D106876, PCM files don't report module maps as input files unless they contributed to the compilation.
Reporting
[clang][modules] Report module maps affecting `no_undeclared_includes` modules
Since D106876, PCM files don't report module maps as input files unless they contributed to the compilation.
Reporting only module maps of (transitively) imported modules is not enough, though. For modules marked with `[no_undeclared_includes]`, other module maps affect the compilation by introducing anti-dependencies.
This patch makes sure such module maps are being reported as input files.
Depends on D120463.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D120464
show more ...
|
Revision tags: llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
0e9373a6 |
| 10-Oct-2021 |
Kazu Hirata <kazu@google.com> |
[Basic] Use llvm::is_contained (NFC)
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4 |
|
#
601102d2 |
| 14-Sep-2021 |
Corentin Jabot <corentin.jabot@gmail.com> |
Cleanup identifier parsing; NFC
Rename methods to clearly signal when they only deal with ASCII, simplify the parsing of identifier, and use start/continue instead of head/body for consistency with
Cleanup identifier parsing; NFC
Rename methods to clearly signal when they only deal with ASCII, simplify the parsing of identifier, and use start/continue instead of head/body for consistency with Unicode terminology.
show more ...
|
Revision tags: llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
d3676d4b |
| 17-May-2021 |
Michael Spencer <bigcheesegs@gmail.com> |
[clang][modules] Build inferred modules
This patch enables explicitly building inferred modules.
Effectively a cherry-pick of https://github.com/apple/llvm-project/pull/699 authored by @Bigcheese w
[clang][modules] Build inferred modules
This patch enables explicitly building inferred modules.
Effectively a cherry-pick of https://github.com/apple/llvm-project/pull/699 authored by @Bigcheese with libclang and dependency scanner changes omitted.
Contains the following changes:
1. [Clang] Fix the header paths in clang::Module for inferred modules. * The UmbrellaAsWritten and NameAsWritten fields in clang::Module are a lie for framework modules. For those they actually are the path to the header or umbrella relative to the clang::Module::Directory. * The exception to this case is for inferred modules. Here it actually is the name as written, because we print out the module and read it back in when implicitly building modules. This causes a problem when explicitly building an inferred module, as we skip the printing out step. * In order to fix this issue this patch adds a new field for the path we want to use in getInputBufferForModule. It also makes NameAsWritten actually be the name written in the module map file (or that would be, in the case of an inferred module).
2. [Clang] Allow explicitly building an inferred module. * Building the actual module still fails, but make sure it fails for the right reason.
Split from D100934.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D102491
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
#
3775d811 |
| 23-Mar-2021 |
Richard Smith <richard@metafoo.co.uk> |
Improve module dumping for debugging.
* List inferred lists of imports in `#pragma clang __debug module_map`.
* Add `#pragma clang __debug modules {all,visible,building}` to dump lists of k
Improve module dumping for debugging.
* List inferred lists of imports in `#pragma clang __debug module_map`.
* Add `#pragma clang __debug modules {all,visible,building}` to dump lists of known / visible module names or the building modules stack.
show more ...
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
#
64d8c781 |
| 23-Feb-2021 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Revert "Module: Use FileEntryRef and DirectoryEntryRef in Umbrella, Header, and DirectoryName, NFC"
This (mostly) reverts 32c501dd88b62787d3a5ffda7aabcf4650dbe3cd. Hit a case where this causes a be
Revert "Module: Use FileEntryRef and DirectoryEntryRef in Umbrella, Header, and DirectoryName, NFC"
This (mostly) reverts 32c501dd88b62787d3a5ffda7aabcf4650dbe3cd. Hit a case where this causes a behaviour change, perhaps the same root cause that triggered the revert of a40db5502b2515a6f2f1676b5d7a655ae0f41179 in 7799ef7121aa7d59f4bd95cdf70035de724ead6f.
(The API changes in DirectoryEntry.h have NOT been reverted as a number of subsequent commits depend on those.)
https://reviews.llvm.org/D90497#2582166
show more ...
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
c70f3686 |
| 17-Dec-2020 |
Fangrui Song <i@maskray.me> |
Use basic_string::find(char) instead of basic_string::find(const char *s, size_type pos=0)
Many (StringRef) cannot be detected by clang-tidy performance-faster-string-find.
|
Revision tags: llvmorg-11.0.1-rc1 |
|
#
32c501dd |
| 30-Oct-2020 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Module: Use FileEntryRef and DirectoryEntryRef in Umbrella, Header, and DirectoryName, NFC
Push `FileEntryRef` and `DirectoryEntryRef` further, using it them `Module::Umbrella`, `Module::Header::Ent
Module: Use FileEntryRef and DirectoryEntryRef in Umbrella, Header, and DirectoryName, NFC
Push `FileEntryRef` and `DirectoryEntryRef` further, using it them `Module::Umbrella`, `Module::Header::Entry`, and `Module::DirectoryName::Entry`.
- Add `DirectoryEntryRef::operator const DirectoryEntry *` and `OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr`, to get the same "degrades to `DirectoryEntry*` behaviour `FileEntryRef` enjoys (this avoids a bunch of churn in various clang tools). - Fix the `DirectoryEntryRef` constructor from `MapEntry` to take it by `const&`.
Note that we cannot get rid of the `...AsWritten` names leveraging the new classes, since these need to be as written in the `ModuleMap` file and the module directory path is preprended for the lookup in the `FileManager`.
Differential Revision: https://reviews.llvm.org/D90497
show more ...
|
#
6e73cfa8 |
| 29-Oct-2020 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Basic: Change Module::Umbrella to a PointerUnion, NFC
Change `Module::Umbrella` from a `const void *` to a `PointerUnion` of `FileEntry` and `DirectoryEntry`. We can drop the `HasUmbrellaDir` bit (s
Basic: Change Module::Umbrella to a PointerUnion, NFC
Change `Module::Umbrella` from a `const void *` to a `PointerUnion` of `FileEntry` and `DirectoryEntry`. We can drop the `HasUmbrellaDir` bit (since `PointerUnion` includes that).
This change makes it safer to update to `FileEntryRef` and `DirectoryEntryRef` in a future patch.
Differential Revision: https://reviews.llvm.org/D90481
show more ...
|
#
9f151df1 |
| 20-Oct-2020 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC
Change `Module::ASTFile` and `ModuleFile::File` to use `Optional<FileEntryRef>` instead of `const FileEntry *`. One of many
Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC
Change `Module::ASTFile` and `ModuleFile::File` to use `Optional<FileEntryRef>` instead of `const FileEntry *`. One of many steps toward removing `FileEntry::getName`.
Differential Revision: https://reviews.llvm.org/D89836
show more ...
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
#
b907ad53 |
| 21-Jul-2020 |
Adrian Prantl <aprantl@apple.com> |
[NFC] Clean up doc comment and implementation for Module::isSubModuleOf.
Patch by Varun Gandhi!
Differential Revision: https://reviews.llvm.org/D84087
|
Revision tags: llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
#
6bc75023 |
| 18-Apr-2020 |
Richard Smith <richard@metafoo.co.uk> |
When making modules transitively visible, don't take into account whether they have missing header files.
Whether a module's headers happen to be present on the local file system should make no diff
When making modules transitively visible, don't take into account whether they have missing header files.
Whether a module's headers happen to be present on the local file system should make no difference to whether we make its contents visible when importing another module that re-exports it. If we have an up-to-date AST file that we can load, that's all that matters.
This fixes the ability to header syntax checking for modular headers in C++20 mode (or in prior modes where -fmodules-local-submodule-visibility is enabled but -fmodules is not).
show more ...
|
#
fc76b4ad |
| 17-Apr-2020 |
Richard Smith <richard@metafoo.co.uk> |
Rename IsMissingRequirement to IsUnimportable and set it for shadowed modules too.
This more accurately reflects the semantics of this flag, as distinct from "IsAvailable", which (in an explicit mod
Rename IsMissingRequirement to IsUnimportable and set it for shadowed modules too.
This more accurately reflects the semantics of this flag, as distinct from "IsAvailable", which (in an explicit modules world) only describes whether a module is buildable, not whether it's importable.
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5 |
|
#
f4754ea0 |
| 17-Mar-2020 |
Adrian Prantl <aprantl@apple.com> |
Remove const qualifier from Modules returned by ExternalASTSource. (NFC)
This API is used by LLDB to attach owning module information to Declarations deserialized from DWARF.
Differential Revision:
Remove const qualifier from Modules returned by ExternalASTSource. (NFC)
This API is used by LLDB to attach owning module information to Declarations deserialized from DWARF.
Differential Revision: https://reviews.llvm.org/D75561
show more ...
|
Revision tags: llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
c915cb95 |
| 28-Feb-2020 |
Reid Kleckner <rnk@google.com> |
Avoid including Module.h from ExternalASTSource.h
Module.h takes 86ms to parse, mostly parsing the class itself. Avoid it if possible. ASTContext.h depends on ExternalASTSource.h.
A few NFC changes
Avoid including Module.h from ExternalASTSource.h
Module.h takes 86ms to parse, mostly parsing the class itself. Avoid it if possible. ASTContext.h depends on ExternalASTSource.h.
A few NFC changes were needed to make this possible:
- Move ASTSourceDescriptor to Module.h. This needs Module to be complete, and seems more related to modules and AST files than external AST sources. - Move "import complete" bit from Module* pointer int pair to NextLocalImport pointer. Required because PointerIntPair<Module*,...> requires Module to be complete, and now it may not be.
Reviewed By: aaron.ballman, hans
Differential Revision: https://reviews.llvm.org/D75784
show more ...
|
#
bc883665 |
| 27-Feb-2020 |
Reid Kleckner <rnk@google.com> |
Forward declare FileEntry and DirectoryEntry in Module.h
FileManager.h is an expensive header (~350ms for me in isolation), so try to do without it.
Notably, we need to avoid checking the alignment
Forward declare FileEntry and DirectoryEntry in Module.h
FileManager.h is an expensive header (~350ms for me in isolation), so try to do without it.
Notably, we need to avoid checking the alignment of FileEntry, which happens for DenseMap<FileEntry*> and PointerUnion<FileEntry*>. I adjusted the code to avoid PointerUnion, and moved the DenseMap insertion to the .cpp file.
Globally, this only saved about ~17 includes of the related headers because SourceManager.h still includes FileManager.h, and it is more popular than Module.h.
show more ...
|
Revision tags: llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
#
bb39b529 |
| 29-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
Fix conversions in clang and examples
|
Revision tags: llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2 |
|
#
8d323d15 |
| 01-Aug-2019 |
Harlan Haskins <harlan@harlanhaskins.com> |
[clang] Adopt new FileManager error-returning APIs
Update the callers of FileManager::getFile and FileManager::getDirectory to handle the new llvm::ErrorOr-returning methods.
Signed-off-by: Harlan
[clang] Adopt new FileManager error-returning APIs
Update the callers of FileManager::getFile and FileManager::getDirectory to handle the new llvm::ErrorOr-returning methods.
Signed-off-by: Harlan Haskins <harlan@apple.com> llvm-svn: 367616
show more ...
|