#
3b7c3a65 |
| 25-Jun-2022 |
Kazu Hirata <kazu@google.com> |
Revert "Don't use Optional::hasValue (NFC)"
This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.
|
#
aa8feeef |
| 25-Jun-2022 |
Kazu Hirata <kazu@google.com> |
Don't use Optional::hasValue (NFC)
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
#
99cfccdc |
| 20-Apr-2022 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][lex] NFCI: Use FileEntryRef in ModuleMap::diagnoseHeaderInclusion()
This patch removes uses of the deprecated `DirectoryEntry::getName()` from the `ModuleMap::diagnoseHeaderInclusion()` func
[clang][lex] NFCI: Use FileEntryRef in ModuleMap::diagnoseHeaderInclusion()
This patch removes uses of the deprecated `DirectoryEntry::getName()` from the `ModuleMap::diagnoseHeaderInclusion()` function by using `{File,Directory}EntryRef` instead.
Reviewed By: bnbarham
Differential Revision: https://reviews.llvm.org/D123856
show more ...
|
Revision tags: llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, 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, llvmorg-13.0.0, llvmorg-13.0.0-rc4, 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, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, 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, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
#
6c0e60e8 |
| 20-Sep-2020 |
Iain Sandoe <iain@sandoe.co.uk> |
[C++20][Modules][HU 1/5] Introduce header units as a module type.
This is the first in a series of patches that introduce C++20 importable header units.
These differ from clang header modules in th
[C++20][Modules][HU 1/5] Introduce header units as a module type.
This is the first in a series of patches that introduce C++20 importable header units.
These differ from clang header modules in that: (a) they are identifiable by an internal name (b) they represent the top level source for a single header - although that might include or import other headers.
We name importable header units with the path by which they are specified (although that need not be the absolute path for the file).
So "foo/bar.h" would have a name "foo/bar.h". Header units are made a separate module type so that we can deal with diagnosing places where they are permitted but a named module is not.
Differential Revision: https://reviews.llvm.org/D121095
show more ...
|
#
d813116c |
| 01-Mar-2022 |
Dawid Jurczak <dawid_jurek@vp.pl> |
[NFC][Lexer] Remove getLangOpts function from Lexer
Given that there is only one external user of Lexer::getLangOpts we can remove getter entirely without much pain.
Differential Revision: https://
[NFC][Lexer] Remove getLangOpts function from Lexer
Given that there is only one external user of Lexer::getLangOpts we can remove getter entirely without much pain.
Differential Revision: https://reviews.llvm.org/D120404
show more ...
|
#
8f4ea36b |
| 25-Feb-2022 |
Adam Czachorowski <adamcz@google.com> |
[clang] Improve laziness of resolving module map headers.
clang has support for lazy headers in module maps - if size and/or modtime and provided in the cppmap file, headers are only resolved when a
[clang] Improve laziness of resolving module map headers.
clang has support for lazy headers in module maps - if size and/or modtime and provided in the cppmap file, headers are only resolved when an include directive for a file with that size/modtime is encoutered.
Before this change, the lazy resolution was all-or-nothing per module. That means as soon as even one file in that module potentially matched an include, all lazy files in that module were resolved. With this change, only files with matching size/modtime will be resolved.
The goal is to avoid unnecessary stat() calls on non-included files, which is especially valuable on networked file systems, with higher latency.
Differential Revision: https://reviews.llvm.org/D120569
show more ...
|
#
e587372f |
| 08-Dec-2021 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[C++20] [Module] Support extern C/C++ semantics
According to [module.unit]p7.2.3, a declaration within a linkage-specification should be attached to the global module. This let user to forward decla
[C++20] [Module] Support extern C/C++ semantics
According to [module.unit]p7.2.3, a declaration within a linkage-specification should be attached to the global module. This let user to forward declare types across modules.
Reviewed by: rsmith, aaron.ballman
Differential Revision: https://reviews.llvm.org/D110215
show more ...
|
#
8adb6d6d |
| 07-Nov-2021 |
Benjamin Kramer <benny.kra@googlemail.com> |
[clang] Use llvm::reverse. NFCI.
|
#
7cc8fa2d |
| 24-Oct-2021 |
Kazu Hirata <kazu@google.com> |
Use llvm::is_contained (NFC)
|
#
d0e7bdc2 |
| 09-Oct-2021 |
Volodymyr Sapsai <vsapsai@apple.com> |
[modules] Make a module map referenced by a system map a system one too.
Mimic the behavior of including headers where a system includer makes an includee a system header too.
rdar://84049469
Diff
[modules] Make a module map referenced by a system map a system one too.
Mimic the behavior of including headers where a system includer makes an includee a system header too.
rdar://84049469
Differential Revision: https://reviews.llvm.org/D111476
show more ...
|
#
e567f37d |
| 14-Oct-2021 |
Kazu Hirata <kazu@google.com> |
[clang] Use llvm::is_contained (NFC)
|
#
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 ...
|
#
21401a72 |
| 21-Jul-2021 |
Simon Tatham <simon.tatham@arm.com> |
[clang] Introduce SourceLocation::[U]IntTy typedefs.
This is part of a patch series working towards the ability to make SourceLocation into a 64-bit type to handle larger translation units.
NFC: th
[clang] Introduce SourceLocation::[U]IntTy typedefs.
This is part of a patch series working towards the ability to make SourceLocation into a 64-bit type to handle larger translation units.
NFC: this patch introduces typedefs for the integer type used by SourceLocation and makes all the boring changes to use the typedefs everywhere, but for the moment, they are unconditionally defined to uint32_t.
Patch originally by Mikhail Maltsev.
Reviewed By: tmatheson
Differential Revision: https://reviews.llvm.org/D105492
show more ...
|
#
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 ...
|
#
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 ...
|
#
7799ef71 |
| 15-Dec-2020 |
Nico Weber <thakis@chromium.org> |
Revert "Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef"
This reverts commit a40db5502b2515a6f2f1676b5d7a655ae0f41179. and follow-up d636b881bb9214938973098a012fad453082c444
Somewhat sp
Revert "Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef"
This reverts commit a40db5502b2515a6f2f1676b5d7a655ae0f41179. and follow-up d636b881bb9214938973098a012fad453082c444
Somewhat speculative, likely broke check-clang on Windows: https://reviews.llvm.org/D92975#2453482
show more ...
|
#
a40db550 |
| 09-Dec-2020 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef
Migrate `HeaderSearch::LoadedModuleMaps` and a number of APIs over to `FileEntryRef`. This should have no functionality change. Note that
Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef
Migrate `HeaderSearch::LoadedModuleMaps` and a number of APIs over to `FileEntryRef`. This should have no functionality change. Note that two `FileEntryRef`s hash the same if they point at the same `FileEntry`.
Differential Revision: https://reviews.llvm.org/D92975
show more ...
|
#
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 ...
|
#
f85db7f7 |
| 29-Oct-2020 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Lex: Update Module::findHeader to return FileEntryRef, NFC
Update `Module::findHeader` to return `Optional<FileEntryRef>` and fix its one caller.
Differential Revision: https://reviews.llvm.org/D90
Lex: Update Module::findHeader to return FileEntryRef, NFC
Update `Module::findHeader` to return `Optional<FileEntryRef>` and fix its one caller.
Differential Revision: https://reviews.llvm.org/D90485
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 ...
|
#
b03ae743 |
| 14-Oct-2020 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
clang/Lex: Stop using SourceManager::getBuffer
Update clang/lib/Lex to stop relying on a `MemoryBuffer*`, using the `MemoryBufferRef` from `getBufferOrNone` since both locations had logic for checki
clang/Lex: Stop using SourceManager::getBuffer
Update clang/lib/Lex to stop relying on a `MemoryBuffer*`, using the `MemoryBufferRef` from `getBufferOrNone` since both locations had logic for checking validity of the buffer. There's potentially a functionality change, since the logic was wrong (it checked for `nullptr`, which was never returned by the old API), but if that was reachable the new behaviour should be better.
Differential Revision: https://reviews.llvm.org/D89402
show more ...
|
Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
#
8839e278 |
| 23-Jul-2020 |
Volodymyr Sapsai <vsapsai@apple.com> |
[Modules] Improve error message when cannot find parent module for submodule definition.
Before the change the diagnostic for
module unknown.submodule {}
was "error: expected module name" whic
[Modules] Improve error message when cannot find parent module for submodule definition.
Before the change the diagnostic for
module unknown.submodule {}
was "error: expected module name" which is incorrect and misleading because both "unknown" and "submodule" are valid module names.
We already have a better error message when a parent module is a submodule itself and is missing. Make the error for a missing top-level module more like the one for a submodule.
rdar://problem/64424407
Reviewed By: bruno
Differential Revision: https://reviews.llvm.org/D84458
show more ...
|
Revision tags: llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
8d74de9d |
| 29-May-2020 |
Martin Boehme <mboehme@google.com> |
[clang] Always allow including builtin headers in [no_undeclared_headers] modules.
Previously, this would fail if the builtin headers had been "claimed" by a different module that wraps these builti
[clang] Always allow including builtin headers in [no_undeclared_headers] modules.
Previously, this would fail if the builtin headers had been "claimed" by a different module that wraps these builtin headers. libc++ does this, for example.
This change adds a test demonstrating this situation; the test fails without the fix.
show more ...
|
Revision tags: llvmorg-10.0.1-rc1 |
|
#
0a088ead |
| 29-Apr-2020 |
Richard Smith <richard@metafoo.co.uk> |
Improve diagnostics for missing import / #include of module.
Fix a few bugs where we would fail to properly determine header to module correspondence when determining whether to suggest a #include o
Improve diagnostics for missing import / #include of module.
Fix a few bugs where we would fail to properly determine header to module correspondence when determining whether to suggest a #include or import, and suggest a #include more often in language modes where there is no import syntax. Generally, if the target is in a header with include guards or #pragma once, we should suggest either #including or importing that header, and not importing a module that happens to textually include it.
In passing, improve the notes we attach to the corresponding diagnostics: calling an entity that we couldn't see "previous" is confusing.
show more ...
|
#
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 ...
|