| Age | Commit message (Collapse) | Author |
|
We're in favor of the llvm::writeToOutput API, and all
writeFileAtomically usages have been migrated to writeToOutput.
Differential Revision: https://reviews.llvm.org/D153740
|
|
Fixes https://github.com/llvm/llvm-project/issues/56747
Patch By: ipriyanshi1708
Differential Revision: https://reviews.llvm.org/D146644
|
|
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
|
|
|
|
Functionality of restoreStatOnFile may be reused. Move it into
FileUtilities.cpp. Create helper class FilePermissionsApplier
to store and apply permissions.
Differential Revision: https://reviews.llvm.org/D123821
|
|
A few more forward-declarations, a few less headers. the impact on number of
preprocessed lines for LLVMSupport is negligible (-3K lines) but it's always
good to remove dependencies.
Related discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup
|
|
The cleanup was manual, but assisted by "include-what-you-use". It consists in
1. Removing unused forward declaration. No impact expected.
2. Removing unused headers in .cpp files. No impact expected.
3. Removing unused headers in .h files. This removes implicit dependencies and
is generally considered a good thing, but this may break downstream builds.
I've updated llvm, clang, lld, lldb and mlir deps, and included a list of the
modification in the second part of the commit.
4. Replacing header inclusion by forward declaration. This has the same impact
as 3.
Notable changes:
- llvm/Support/TargetParser.h no longer includes llvm/Support/AArch64TargetParser.h nor llvm/Support/ARMTargetParser.h
- llvm/Support/TypeSize.h no longer includes llvm/Support/WithColor.h
- llvm/Support/YAMLTraits.h no longer includes llvm/Support/Regex.h
- llvm/ADT/SmallVector.h no longer includes llvm/Support/MemAlloc.h nor llvm/Support/ErrorHandling.h
You may need to add some of these headers in your compilation units, if needs be.
As an hint to the impact of the cleanup, running
clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before: 8000919 lines
after: 7917500 lines
Reduced dependencies also helps incremental rebuilds and is more ccache
friendly, something not shown by the above metric :-)
Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
|
|
Identified with readability-redundant-string-cstr.
|
|
I've left out some cases where I wasn't totally sure this was right or
whether the include was ok (compiler-rt) or idiomatic (flang).
|
|
|
|
writeFileAtomically. NFC"
function_ref causes calls to the function to be ambiguous, breaking
compilation.
Reverting for now.
llvm-svn: 372202
|
|
Summary:
The latter is slightly more efficient and communicates the intent of the
API: writeFileAtomically does not own or copy the callback, it merely
calls it at some point.
Reviewers: jkorous
Reviewed By: jkorous
Subscribers: hiraditya, dexonsmith, jfb, llvm-commits, cfe-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67584
llvm-svn: 372201
|
|
Differential Revision: https://reviews.llvm.org/D67424
llvm-svn: 371890
|
|
Differential Revision: https://reviews.llvm.org/D66859
llvm-svn: 371103
|
|
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
|
|
other minor fixes.
Differential revision: https://reviews.llvm.org/D23789
llvm-svn: 279535
|
|
Cleanup for upcoming Clang warning -Wcomma. No functionality change intended.
llvm-svn: 261270
|
|
Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get
a reference to it.
Thanks to David Blaikie for the suggestion.
llvm-svn: 214516
|
|
llvm-svn: 212405
|
|
llvm-svn: 210871
|
|
This should make sure that most new uses use the std prefix.
llvm-svn: 210835
|
|
This is a minimal change to remove the header. I will remove the occurrences
of "using std::error_code" in a followup patch.
llvm-svn: 210803
|
|
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.
llvm-svn: 203083
|
|
llvm-svn: 186018
|
|
llvm-svn: 183982
|
|
llvm-svn: 183941
|
|
function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration.
llvm-svn: 175006
|
|
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.
Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]
llvm-svn: 169131
|
|
Unify default construction of error_code uses on this idiom so that users don't
feel compelled to make static globals for naming convenience. (unfortunately I
couldn't make the original ctor private as some APIs don't return their result,
instead using an out parameter (that makes sense to default construct) - which
is a bit of a pity. I did, however, find/fix some cases of unnecessary default
construction of error_code before I hit the unfixable cases)
llvm-svn: 150197
|
|
Luis Felipe Strano Moraes!
llvm-svn: 129558
|
|
via an out parm.
llvm-svn: 121958
|
|
llvm-svn: 121382
|
|
error_code &ec. And fix clients.
llvm-svn: 121379
|
|
llvm-svn: 120298
|
|
no tolerance is set.
llvm-svn: 106033
|
|
1..19 ok
to
1..20 o k
(yes, the odd space is necessary).
llvm-svn: 106032
|
|
llvm-svn: 94808
|
|
llvm-svn: 50659
|
|
start of a filename, not a filename+length. All clients can produce a
null terminated name, and the system api's require null terminated
strings anyway.
llvm-svn: 49041
|
|
not an mmapped file. This more closely matches its requirements and
provides an implicitly null terminated buffer, something this
routine had to emulate itself before.
llvm-svn: 49024
|
|
and shared. This complicates the design, is not used, and probably
doesn't even work.
llvm-svn: 49022
|
|
annoying warnings.
llvm-svn: 47367
|
|
llvm-svn: 46458
|
|
llvm-svn: 46455
|
|
llvm-svn: 45418
|
|
Change uses of sys::Path class to sys::PathWithStatus in those places where
the file status information is needed.
llvm-svn: 35743
|
|
Make the sys::Path::getFileStatus function more efficient by having it
return a pointer to the FileStatus structure rather than copy it. Adjust
uses of the function accordingly. Also, fix some memory issues in sys::Path.
llvm-svn: 35476
|
|
Updates for change in interface of getFileStatus method of sys::Path class.
llvm-svn: 35458
|
|
llvm-svn: 31908
|
|
llvm-svn: 31561
|