|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, 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, 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 |
|
| #
0916d96d |
| 21-Jun-2022 |
Kazu Hirata <[email protected]> |
Don't use Optional::hasValue (NFC)
|
| #
d9390b6a |
| 13-Jun-2022 |
Jan Svoboda <[email protected]> |
Reapply "[clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::load*()"
This reverts commit 340654e0f246cddb3fb6ebddb843ade9bfcff0a5, essentially reapplying 1d3ba05e4a288b49287fe997763e90234b8c6
Reapply "[clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::load*()"
This reverts commit 340654e0f246cddb3fb6ebddb843ade9bfcff0a5, essentially reapplying 1d3ba05e4a288b49287fe997763e90234b8c62db.
The test VFS/real-path-found-first.m that was failing on Windows is now passing with a workaround.
show more ...
|
| #
5f57ca20 |
| 11-Jun-2022 |
Nico Weber <[email protected]> |
fix comment typo to cycle bots
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4 |
|
| #
b6c67c3c |
| 04-May-2022 |
Cyndy Ishida <[email protected]> |
[clang] Track how headers get included generally during lookup time
tapi & clang-extractapi both attempt to construct then check against how a header was included to determine api information when w
[clang] Track how headers get included generally during lookup time
tapi & clang-extractapi both attempt to construct then check against how a header was included to determine api information when working against multiple search paths, headermap, and vfsoverlay mechanisms. Validating this against what the preprocessor sees during lookup time makes this check more reliable.
Reviewed By: zixuw, jansvoboda11
Differential Revision: https://reviews.llvm.org/D124638
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2 |
|
| #
340654e0 |
| 20-Apr-2022 |
Jan Svoboda <[email protected]> |
Revert "[clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::load*()"
This reverts commit 1d3ba05e4a288b49287fe997763e90234b8c62db which caused failures of the VFS/real-path-found-first.m test
Revert "[clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::load*()"
This reverts commit 1d3ba05e4a288b49287fe997763e90234b8c62db which caused failures of the VFS/real-path-found-first.m test on Windows build bots.
show more ...
|
| #
f43ce519 |
| 20-Apr-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] NFCI: Use DirectoryEntryRef in FrameworkCacheEntry
This patch changes the member of `FrameworkCacheEntry` from `const DirectoryEntry *` to `Optional<DirectoryEntryRef>` in order to remo
[clang][lex] NFCI: Use DirectoryEntryRef in FrameworkCacheEntry
This patch changes the member of `FrameworkCacheEntry` from `const DirectoryEntry *` to `Optional<DirectoryEntryRef>` in order to remove uses of the deprecated `DirectoryEntry::getName()`.
Reviewed By: bnbarham
Differential Revision: https://reviews.llvm.org/D123854
show more ...
|
| #
1d3ba05e |
| 20-Apr-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::load*()
This patch removes uses of the deprecated `DirectoryEntry::getName()` from `HeaderSearch::load*()` functions by using `DirectoryEntr
[clang][lex] NFCI: Use DirectoryEntryRef in HeaderSearch::load*()
This patch removes uses of the deprecated `DirectoryEntry::getName()` from `HeaderSearch::load*()` functions by using `DirectoryEntryRef` instead.
Note that we bail out in one case and use the also deprecated `FileEntry::getLastRef()`. That's to prevent this patch from growing, and is addressed in a follow-up.
Reviewed By: bnbarham
Differential Revision: https://reviews.llvm.org/D123771
show more ...
|
|
Revision tags: llvmorg-14.0.1 |
|
| #
b672638d |
| 07-Apr-2022 |
Jan Svoboda <[email protected]> |
[clang][deps] Ensure deterministic filename case
The dependency scanner can reuse single FileManager instance across multiple translation units. This may lead to non-deterministic output depending o
[clang][deps] Ensure deterministic filename case
The dependency scanner can reuse single FileManager instance across multiple translation units. This may lead to non-deterministic output depending on which TU gets processed first.
One of the problems is that Clang uses DirectoryEntry::getName in the header search algorithm. This function returns the path that was first used to construct the (shared) entry in FileManager. Using DirectoryEntryRef::getName instead preserves the case as it was spelled out for the current "get directory entry" request.
rdar://90647508
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D123229
show more ...
|
| #
ee572129 |
| 31-Mar-2022 |
Chuanqi Xu <[email protected]> |
[C++20] [Modules] Use '-' as the separator of partitions when searching in filesystems
It is simpler to search for module unit by -fprebuilt-module-path option. However, the separator ':' of partiti
[C++20] [Modules] Use '-' as the separator of partitions when searching in filesystems
It is simpler to search for module unit by -fprebuilt-module-path option. However, the separator ':' of partitions is not friendly. According to the discussion in https://reviews.llvm.org/D118586, I think we get consensus to use '-' as the separator instead. The '-' is the choice of GCC too.
Previously I thought it would be better to add an option. But I feel it is over-engineering now. Another reason here is that there are too many options for modules (for clang module mainly) now. Given it is not bad to use '-' when searching, I think it is acceptable to not add an option.
Reviewed By: iains
Differential Revision: https://reviews.llvm.org/D120874
show more ...
|
| #
59dadd17 |
| 22-Mar-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] Fix failures with Microsoft header search rules
`HeaderSearch` currently assumes `LookupFileCache` is eventually populated in `LookupFile`. However, that's not always the case with `-fm
[clang][lex] Fix failures with Microsoft header search rules
`HeaderSearch` currently assumes `LookupFileCache` is eventually populated in `LookupFile`. However, that's not always the case with `-fms-compatibility` and its early returns.
This patch adds a defensive check that the iterator pulled out of the cache is actually valid before using it.
(This bug was introduced in D119721. Before that, the cache was initialized to `0` - essentially the `search_dir_begin()` iterator.)
Reviewed By: dexonsmith, erichkeane
Differential Revision: https://reviews.llvm.org/D122237
show more ...
|
| #
6007b0b6 |
| 16-Mar-2022 |
Jan Svoboda <[email protected]> |
[clang][deps] NFC: Use range-based for loop instead of iterators
The iterator is not needed after the loop body anymore, meaning we can use more terse range-based for loop.
Depends on D121295.
Rev
[clang][deps] NFC: Use range-based for loop instead of iterators
The iterator is not needed after the loop body anymore, meaning we can use more terse range-based for loop.
Depends on D121295.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D121685
show more ...
|
| #
77924d60 |
| 16-Mar-2022 |
Jan Svoboda <[email protected]> |
[clang][deps] Modules don't contribute to search path usage
To reduce the number of modules we build in explicit builds (which use strict context hash), we prune unused header search paths. This ess
[clang][deps] Modules don't contribute to search path usage
To reduce the number of modules we build in explicit builds (which use strict context hash), we prune unused header search paths. This essentially merges parts of the dependency graph.
Determining whether a search path was used to discover a module (through implicit module maps) proved to be somewhat complicated. Initial support landed in D102923, while D113676 attempts to fix some bugs.
However, now that we don't use implicit module maps in explicit builds (since D120465), we don't need to consider such search paths as used anymore. Modules are no longer discovered through the header search mechanism, so we can drop such search paths (provided they are not needed for other reasons).
This patch removes whatever support for detecting such usage we had, since it's buggy and not required anymore.
Depends on D120465.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D121295
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
e7dcf09f |
| 15-Feb-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] Use `SearchDirIterator` types in for loops
This patch replaces a lot of index-based loops with iterators and ranges.
Depends on D117566.
Reviewed By: ahoppen
Differential Revision: h
[clang][lex] Use `SearchDirIterator` types in for loops
This patch replaces a lot of index-based loops with iterators and ranges.
Depends on D117566.
Reviewed By: ahoppen
Differential Revision: https://reviews.llvm.org/D119722
show more ...
|
| #
17c9fcd6 |
| 15-Feb-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] Use `ConstSearchDirIterator` in lookup cache
This patch starts using the new iterator type in `LookupFileCacheInfo`.
Depends on D117566.
Reviewed By: ahoppen
Differential Revision: h
[clang][lex] Use `ConstSearchDirIterator` in lookup cache
This patch starts using the new iterator type in `LookupFileCacheInfo`.
Depends on D117566.
Reviewed By: ahoppen
Differential Revision: https://reviews.llvm.org/D119721
show more ...
|
| #
7631c366 |
| 15-Feb-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] Introduce `ConstSearchDirIterator`
The `const DirectoryLookup *` out-parameter of `{HeaderSearch,Preprocessor}::LookupFile()` is assigned the most recently used search directory, which
[clang][lex] Introduce `ConstSearchDirIterator`
The `const DirectoryLookup *` out-parameter of `{HeaderSearch,Preprocessor}::LookupFile()` is assigned the most recently used search directory, which callers use to implement `#include_next`.
From the function signature it's not obvious the `const DirectoryLookup *` is being used as an iterator. This patch introduces `ConstSearchDirIterator` to make that affordance obvious. This would've prevented a bug that occurred after initially landing D116750.
Reviewed By: ahoppen
Differential Revision: https://reviews.llvm.org/D117566
show more ...
|
| #
d7969012 |
| 11-Feb-2022 |
ZezhengLi <[email protected]> |
[C++20] [Modules] Check if modulemap exists to avoid crash in implicit used C++ module
An impilt used of C++ module without prebuild path may cause crash.
For example:
``` // ./dir1/C.cppm export
[C++20] [Modules] Check if modulemap exists to avoid crash in implicit used C++ module
An impilt used of C++ module without prebuild path may cause crash.
For example:
``` // ./dir1/C.cppm export module C; // ./dir2/B.cppm export module B; import C; // ./A.cpp import B; import C; ```
When we compile A.cpp without the prebuild path of C.pcm, the compiler will crash.
``` clang++ -std=c++20 --precompile -c ./dir1/C.cppm -o ./dir1/C.pcm clang++ -std=c++20 --precompile -fprebuilt-module-path=./dir2 -c ./dir2/B.cppm -o ./dir2/B.pcm clang++ -std=c++20 -fprebuilt-module-path=./dir2 A.cpp
```
The prebuilt path of module C is cached when import module B, and in the function HeaderSearch::getCachedModuleFileName, the compiler try to get the filename by modulemap without check if modulemap exists, and there is no modulemap in C++ module.
Reviewed By: ChuanqiXu
Differential review: https://reviews.llvm.org/D119426
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
9385ece9 |
| 20-Jan-2022 |
David Goldman <[email protected]> |
[HeaderSearch] Track framework name in LookupFile
Previously, the Framework name was only set if the file came from a header mapped framework; now we'll always set the framework name if the file is
[HeaderSearch] Track framework name in LookupFile
Previously, the Framework name was only set if the file came from a header mapped framework; now we'll always set the framework name if the file is in a framework.
Differential Revision: https://reviews.llvm.org/D117830
show more ...
|
| #
f7202723 |
| 26-Jan-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] Include tracking: simplify and move to preprocessor
This patch replaces the exact include count of each file in `HeaderFileInfo` with a set of included files in `Preprocessor`.
The num
[clang][lex] Include tracking: simplify and move to preprocessor
This patch replaces the exact include count of each file in `HeaderFileInfo` with a set of included files in `Preprocessor`.
The number of includes isn't a property of a header file but rather a preprocessor state. The exact number of includes is not used anywhere except statistic tracking.
Reviewed By: vsapsai
Differential Revision: https://reviews.llvm.org/D114095
show more ...
|
| #
105c9131 |
| 18-Jan-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] NFC: Simplify calls to `LookupFile`
The `{HeaderSearch,Preprocessor}::LookupFile()` functions take an out-parameter `const DirectoryLookup *&`. Most callers end up creating a `const Dir
[clang][lex] NFC: Simplify calls to `LookupFile`
The `{HeaderSearch,Preprocessor}::LookupFile()` functions take an out-parameter `const DirectoryLookup *&`. Most callers end up creating a `const DirectoryLookup *` variable that's otherwise unused.
This patch changes the out-parameter from reference to a pointer, making it possible to simply pass `nullptr` to the function without the ceremony.
Reviewed By: ahoppen
Differential Revision: https://reviews.llvm.org/D117312
show more ...
|
| #
ccd7e783 |
| 13-Jan-2022 |
Jan Svoboda <[email protected]> |
Revert "[clang][lex] Keep references to `DirectoryLookup` objects up-to-date"
This reverts commit 8503c688. This patch causes some issues with `#include_next`: https://github.com/llvm/llvm-project/i
Revert "[clang][lex] Keep references to `DirectoryLookup` objects up-to-date"
This reverts commit 8503c688. This patch causes some issues with `#include_next`: https://github.com/llvm/llvm-project/issues/53161
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
8503c688 |
| 11-Jan-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] Keep references to `DirectoryLookup` objects up-to-date
The elements of `SearchPath::SearchDirs` are being referenced to by their indices. This proved to be error-prone: `HeaderSearch::
[clang][lex] Keep references to `DirectoryLookup` objects up-to-date
The elements of `SearchPath::SearchDirs` are being referenced to by their indices. This proved to be error-prone: `HeaderSearch::SearchDirToHSEntry` was accidentally not being updated in `HeaderSearch::AddSearchPath()`. This patch fixes that by referencing `SearchPath::SearchDirs` elements by their address instead, which is stable thanks to the bump-ptr-allocation strategy.
Reviewed By: ahoppen
Differential Revision: https://reviews.llvm.org/D116750
show more ...
|
| #
0cf7e61a |
| 06-Dec-2021 |
David Goldman <[email protected]> |
[clang][HeaderSearch] Support framework includes in suggestPath...
Clang will now search through the framework includes to identify the framework include path to a file, and then suggest a framework
[clang][HeaderSearch] Support framework includes in suggestPath...
Clang will now search through the framework includes to identify the framework include path to a file, and then suggest a framework style include spelling for the file.
Differential Revision: https://reviews.llvm.org/D115183
show more ...
|
| #
d5ba066c |
| 06-Jan-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] NFC: Move some HeaderSearch functions to .cpp file
|
| #
32c2ea5c |
| 05-Jan-2022 |
Jan Svoboda <[email protected]> |
[clang][lex] NFC: Simplify loop
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
197576c4 |
| 18-Nov-2021 |
Jan Svoboda <[email protected]> |
[clang][lex] Refactor check for the first file include
This patch refactors the code that checks whether a file has just been included for the first time.
The `HeaderSearch::FirstTimeLexingFile` fu
[clang][lex] Refactor check for the first file include
This patch refactors the code that checks whether a file has just been included for the first time.
The `HeaderSearch::FirstTimeLexingFile` function is removed and the information is threaded to the original call site from `HeaderSearch::ShouldEnterIncludeFile`. This will make it possible to avoid tracking the number of includes in a follow up patch.
Depends on D114092.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D114093
show more ...
|