Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6 |
|
#
deffae5d |
| 11-May-2024 |
Kazu Hirata <kazu@google.com> |
[clang] Use StringRef::operator== instead of StringRef::equals (NFC) (#91844)
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.
- StringRef::operator==/!= outnumber Str
[clang] Use StringRef::operator== instead of StringRef::equals (NFC) (#91844)
I'm planning to remove StringRef::equals in favor of
StringRef::operator==.
- StringRef::operator==/!= outnumber StringRef::equals by a factor of
24 under clang/ in terms of their usage.
- The elimination of StringRef::equals brings StringRef closer to
std::string_view, which has operator== but not equals.
- S == "foo" is more readable than S.equals("foo"), especially for
!Long.Expression.equals("str") vs Long.Expression != "str".
show more ...
|
Revision tags: 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 |
|
#
da95d926 |
| 08-Feb-2024 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][lex] Always pass suggested module to `InclusionDirective()` callback (#81061)
This patch provides more information to the
`PPCallbacks::InclusionDirective()` hook. We now always pass the
s
[clang][lex] Always pass suggested module to `InclusionDirective()` callback (#81061)
This patch provides more information to the
`PPCallbacks::InclusionDirective()` hook. We now always pass the
suggested module, regardless of whether it was actually imported or not.
The extra `bool ModuleImported` parameter then denotes whether the
header `#include` will be automatically translated into import the the
module.
The main change is in `clang/lib/Lex/PPDirectives.cpp`, where we take
care to not modify `SuggestedModule` after it's been populated by
`LookupHeaderIncludeOrImport()`. We now exclusively use the `SM`
(`ModuleToImport`) variable instead, which has been equivalent to
`SuggestedModule` until now. This allows us to use the original
non-modified `SuggestedModule` for the callback itself.
(This patch turns out to be necessary for
https://github.com/apple/llvm-project/pull/8011).
show more ...
|
Revision tags: 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 |
|
#
f0972904 |
| 31-May-2023 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang] NFCI: Use `FileEntryRef` in `ModuleMapCallbacks`
This patch removes path hackery from `ModuleMapCallbacks` by adopting `FileEntryRef`. No functional change intended.
Reviewed By: benlangmui
[clang] NFCI: Use `FileEntryRef` in `ModuleMapCallbacks`
This patch removes path hackery from `ModuleMapCallbacks` by adopting `FileEntryRef`. No functional change intended.
Reviewed By: benlangmuir
Differential Revision: https://reviews.llvm.org/D151852
show more ...
|
Revision tags: 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 |
|
#
347028a4 |
| 14-Jan-2023 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang] Report the on-disk paths for inputs to module compiles
Since D135636, PCM files contain the "as requested" path of input files. The machinery for generating dependency files reports those pa
[clang] Report the on-disk paths for inputs to module compiles
Since D135636, PCM files contain the "as requested" path of input files. The machinery for generating dependency files reports those paths as they appeared in the PCM file, which may confuse consumers that are not aware of VFS overlays that might've been in place at compile-time.
This patch makes sure the "use-external-name" setting is being respected when generating dependency files in modular builds by piping the paths serialized in PCMs through `FileEntryRef::getName()` before putting them into dependency files.
rdar://103459532
Reviewed By: benlangmuir
Differential Revision: https://reviews.llvm.org/D141644
show more ...
|
Revision tags: llvmorg-15.0.7 |
|
#
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
|
Revision tags: 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, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
#
d79ad2f1 |
| 11-Apr-2022 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective()
This patch changes type of the `File` parameter in `PPCallbacks::InclusionDirective()` from `const FileEntry *` to `Optional<
[clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective()
This patch changes type of the `File` parameter in `PPCallbacks::InclusionDirective()` from `const FileEntry *` to `Optional<FileEntryRef>`.
With the API change in place, this patch then removes some uses of the deprecated `FileEntry::getName()` (e.g. in `DependencyGraph.cpp` and `ModuleDependencyCollector.cpp`).
Reviewed By: dexonsmith, bnbarham
Differential Revision: https://reviews.llvm.org/D123574
show more ...
|
Revision tags: 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 |
|
#
82b3e28e |
| 06-Apr-2021 |
Abhina Sreeskantharajan <Abhina.Sreeskantharajan@ibm.com> |
[SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text
Problem: On SystemZ we need to open text files in text mode. On Windows, files opened in text mode adds a C
[SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text
Problem: On SystemZ we need to open text files in text mode. On Windows, files opened in text mode adds a CRLF '\r\n' which may not be desirable.
Solution: This patch adds two new flags
- OF_CRLF which indicates that CRLF translation is used. - OF_TextWithCRLF = OF_Text | OF_CRLF indicates that the file is text and uses CRLF translation.
Developers should now use either the OF_Text or OF_TextWithCRLF for text files and OF_None for binary files. If the developer doesn't want carriage returns on Windows, they should use OF_Text, if they do want carriage returns on Windows, they should use OF_TextWithCRLF.
So this is the behaviour per platform with my patch:
z/OS: OF_None: open in binary mode OF_Text : open in text mode OF_TextWithCRLF: open in text mode
Windows: OF_None: open file with no carriage return OF_Text: open file with no carriage return OF_TextWithCRLF: open file with carriage return
The Major change is in llvm/lib/Support/Windows/Path.inc to only set text mode if the OF_CRLF is set. ``` if (Flags & OF_CRLF) CrtOpenFlags |= _O_TEXT; ```
These following files are the ones that still use OF_Text which I left unchanged. I modified all these except raw_ostream.cpp in recent patches so I know these were previously in Binary mode on Windows. ./llvm/lib/Support/raw_ostream.cpp ./llvm/lib/TableGen/Main.cpp ./llvm/tools/dsymutil/DwarfLinkerForBinary.cpp ./llvm/unittests/Support/Path.cpp ./clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp ./clang/lib/Frontend/CompilerInstance.cpp ./clang/lib/Driver/Driver.cpp ./clang/lib/Driver/ToolChains/Clang.cpp
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D99426
show more ...
|
Revision tags: 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 |
|
#
080952a9 |
| 23-Jan-2021 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
Support: Remove duplicated code in {File,clang::ModulesDependency}Collector, NFC
Refactor the duplicated canonicalize-path logic in `FileCollector` and `ModulesDependencyCollector` into a new utilit
Support: Remove duplicated code in {File,clang::ModulesDependency}Collector, NFC
Refactor the duplicated canonicalize-path logic in `FileCollector` and `ModulesDependencyCollector` into a new utility called `PathCanonicalizer` that's shared. This popped up when tracking down a bug common to both in https://reviews.llvm.org/D95202.
As drive-bys, update a few names and comments to better reflect the effect of the code, delay removal of `..`s to avoid an unnecessary extra string copy, and leave behind a couple of FIXMEs for future consideration.
Differential Revision: https://reviews.llvm.org/D95279
show more ...
|
#
ba5628f2 |
| 22-Jan-2021 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
ADT: Use 'using' to inherit assign and append in SmallString
Rather than reimplement, use a `using` declaration to bring in `SmallVectorImpl<char>`'s assign and append implementations in `SmallStrin
ADT: Use 'using' to inherit assign and append in SmallString
Rather than reimplement, use a `using` declaration to bring in `SmallVectorImpl<char>`'s assign and append implementations in `SmallString`.
The `SmallString` versions were missing reference invalidation assertions from `SmallVector`. This patch also fixes a bug in `llvm::FileCollector::addFileImpl`, which was a copy/paste from `clang::ModuleDependencyCollector::copyToRoot`, both caught by the no-longer-skipped assertions.
As a drive-by, this also sinks the `const SmallVectorImpl&` versions of these methods down into `SmallVectorImpl`, since I imagine they'd be useful elsewhere.
Differential Revision: https://reviews.llvm.org/D95202
show more ...
|
Revision tags: 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, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, 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, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
#
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
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 |
|
#
2b3d49b6 |
| 14-Aug-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[Clang] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement o
[Clang] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo.
Differential revision: https://reviews.llvm.org/D66259
llvm-svn: 368942
show more ...
|
Revision tags: llvmorg-9.0.0-rc2 |
|
#
d9b948b6 |
| 05-Aug-2019 |
Fangrui Song <maskray@google.com> |
Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC
F_{None,Text,Append} are kept for compatibility since r334221.
llvm-svn: 367800
|
Revision tags: llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2 |
|
#
77bc7355 |
| 30-Jan-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[ModuleDependencyCollector] Use llvm::sys::fs::real_path (NFC)
Use the real_path implementation from llvm::sys::fs::real_path instead of having a custom implementation in the ModuleDependencyCollect
[ModuleDependencyCollector] Use llvm::sys::fs::real_path (NFC)
Use the real_path implementation from llvm::sys::fs::real_path instead of having a custom implementation in the ModuleDependencyCollector.
Differential revision: https://reviews.llvm.org/D57411
llvm-svn: 352605
show more ...
|
Revision tags: llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
#
ee89b2e0 |
| 24-Oct-2018 |
Volodymyr Sapsai <vsapsai@apple.com> |
[VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS.
'ignore-non-existent-contents' stopped working after r342232 in a way that the actual attribute value isn't used and it work
[VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS.
'ignore-non-existent-contents' stopped working after r342232 in a way that the actual attribute value isn't used and it works as if it is always `true`.
Common use case for VFS iteration is iterating through files in umbrella directories for modules. Ability to detect if some VFS entries point to non-existing files is nice but non-critical. Instead of adding back support for `'ignore-non-existent-contents': false` I am removing the attribute, because such scenario isn't used widely enough and stricter checks don't provide enough value to justify the maintenance.
rdar://problem/45176119
Reviewers: bruno
Reviewed By: bruno
Subscribers: hiraditya, dexonsmith, sammccall, cfe-commits
Differential Revision: https://reviews.llvm.org/D53228
llvm-svn: 345212
show more ...
|
Revision tags: llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2 |
|
#
96fbe58b |
| 10-May-2018 |
Julie Hockett <juliehockett@google.com> |
Reland '[clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective'
This commit relands r331904.
Adding a SrcMgr::CharacteristicKind parameter to the InclusionDirective in PPCallbacks, an
Reland '[clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective'
This commit relands r331904.
Adding a SrcMgr::CharacteristicKind parameter to the InclusionDirective in PPCallbacks, and updating calls to that function. This will be useful in https://reviews.llvm.org/D43778 to determine which includes are system headers.
Differential Revision: https://reviews.llvm.org/D46614
llvm-svn: 332021
show more ...
|
#
b524d5e5 |
| 09-May-2018 |
Julie Hockett <juliehockett@google.com> |
Revert "[clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective"
This reverts commit r331904 because of a memory leak.
llvm-svn: 331932
|
#
36d94ab8 |
| 09-May-2018 |
Julie Hockett <juliehockett@google.com> |
[clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective
Adding a SrcMgr::CharacteristicKind parameter to the InclusionDirective in PPCallbacks, and updating calls to that function. This
[clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective
Adding a SrcMgr::CharacteristicKind parameter to the InclusionDirective in PPCallbacks, and updating calls to that function. This will be useful in https://reviews.llvm.org/D43778 to determine which includes are system headers.
Differential Revision: https://reviews.llvm.org/D46614
llvm-svn: 331904
show more ...
|
#
d637c059 |
| 30-Apr-2018 |
Nico Weber <nicolasweber@gmx.de> |
IWYU for llvm-config.h in clang. See r331124 for details.
llvm-svn: 331177
|
#
6bc635ef |
| 27-Apr-2018 |
Nico Weber <nicolasweber@gmx.de> |
Revert r329698 (and r329702).
Speculative. ClangMoveTests started failing on http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/9958 after this change. I can't reproduce on my machine, le
Revert r329698 (and r329702).
Speculative. ClangMoveTests started failing on http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/9958 after this change. I can't reproduce on my machine, let's see if it was due to this change.
llvm-svn: 331077
show more ...
|
Revision tags: llvmorg-6.0.1-rc1 |
|
#
148c8cb4 |
| 10-Apr-2018 |
Nico Weber <nicolasweber@gmx.de> |
Use llvm::sys::fs::real_path() in clang.
No expected behavior change. https://reviews.llvm.org/D45165
llvm-svn: 329698
|
#
2a8c18d9 |
| 06-Apr-2018 |
Alexander Kornienko <alexfh@google.com> |
Fix typos in clang
Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of:
archtype cas classs checkk compres definit frome iff inteval ith lod metho
Fix typos in clang
Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of:
archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru
Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.)
Differential revision: https://reviews.llvm.org/D44188
llvm-svn: 329399
show more ...
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
3170de0e |
| 01-Jul-2017 |
Hiroshi Inoue <inouehrs@jp.ibm.com> |
fix trivial typos; NFC
llvm-svn: 306954
|