| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add support to control where files for a distributed backend (the
individual index files and optional imports files) are created.
This is invoked with a new thinlto-prefix-replace option in the gold
plugin and llvm-lto. If specified, expects a string of the form
"oldprefix:newprefix", and instead of generating these files in the
same directory path as the corresponding bitcode file, will use a path
formed by replacing the bitcode file's path prefix matching oldprefix
with newprefix.
Also add a new replace_path_prefix helper to Path.h in libSupport.
Depends on D19636.
Reviewers: joker.eph
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D19644
llvm-svn: 269771
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rafael, craig.topper, bogner
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19724
llvm-svn: 268062
|
|
|
|
|
|
|
|
|
|
|
|
| |
at least as big as the mach header to be identified as a Mach-O file and
make sure smaller files are not identified as a Mach-O files but as
unknown files. Also fix identify_magic() so it looks at all 4 bytes of
the filetype field when determining the type of the Mach-O file.
Then fix the macho-invalid-header test case to check that it is an
unknown file and make sure it does not get the error for
object_error::parse_failed. And also update the unit tests.
llvm-svn: 258883
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D14393
llvm-svn: 252499
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The new function sys::path::user_cache_directory tries to discover
a directory suitable for cache storage for current system user.
On Windows and Darwin it returns a path to system-specific user cache directory.
On Linux it follows XDG Base Directory Specification, what is:
- use non-empty $XDG_CACHE_HOME env var,
- use $HOME/.cache.
Reviewers: chapuni, aaron.ballman, rafael
Subscribers: rafael, aaron.ballman, llvm-commits
Differential Revision: http://reviews.llvm.org/D13801
llvm-svn: 251784
|
|
|
|
| |
llvm-svn: 250999
|
|
|
|
|
|
| |
This will be used soon from clang.
llvm-svn: 249309
|
|
|
|
|
|
| |
And make it more robust in the edge case of exactly "./" as input.
llvm-svn: 246711
|
|
|
|
| |
llvm-svn: 244268
|
|
|
|
| |
llvm-svn: 242921
|
|
|
|
| |
llvm-svn: 242334
|
|
|
|
|
|
| |
NFC.
llvm-svn: 232976
|
|
|
|
|
|
|
| |
We were treating '/.foo' as ['/', '.', 'foo'] instead of ['/', '.foo'],
which lead to insanity. Same for '..'.
llvm-svn: 231727
|
|
|
|
|
|
| |
*reinterpret_cast<u{little,big}{16,32,64}_t>().
llvm-svn: 231016
|
|
|
|
|
|
| |
This particular subtype of Mach-O was missing. Add it.
llvm-svn: 230567
|
|
|
|
|
|
|
|
| |
This reverts commit 228874. For some reason users reported
seeing Clang taking up 25+GB of memory and bringing down
machines with this change. Reverting until we figure it out.
llvm-svn: 228890
|
|
|
|
|
|
|
|
|
| |
For Windows, filename_pos() tries to find the filename by
searching for separators after the last :. Instead, it should
really check for the only location that a : is valid, which is
in the second character, and search for separators after that.
llvm-svn: 228874
|
|
|
|
| |
llvm-svn: 226943
|
|
|
|
|
|
|
|
|
|
|
| |
utils/sort_includes.py.
I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.
llvm-svn: 225974
|
|
|
|
|
|
|
| |
The header claims that this function exists, but the linker wasn't too happy
about it not being in the library.
llvm-svn: 224527
|
|
|
|
| |
llvm-svn: 222208
|
|
|
|
| |
llvm-svn: 221333
|
|
|
|
|
|
| |
The wrong value was returned and the unittest did not cover the stub dylib case.
llvm-svn: 217933
|
|
|
|
|
|
|
| |
Use llvm::COFF::BigObjMagic insetad of the string literal.
Also checks the version number.
llvm-svn: 217633
|
|
|
|
|
|
|
| |
identify_magic recognized a COFF bigobj as an import library file.
This patch fixes that.
llvm-svn: 217627
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main difference is the removal of
std::error_code exists(const Twine &path, bool &result);
It was an horribly redundant interface since a file not existing is also a valid
error_code. Now we have an access function that returns just an error_code. This
is the only function that has to be implemented for Unix and Windows. The
functions can_write, exists and can_execute an now just wrappers.
One still has to be very careful using these function to avoid introducing
race conditions (Time of check to time of use).
llvm-svn: 217625
|
|
|
|
|
|
| |
const from some other StringRefs since its implicitly const already.
llvm-svn: 216820
|
|
|
|
|
|
|
|
|
| |
We had two functions for finding the temp or cache directory. Each had a
different set of smarts about OS specific APIs.
With this patch system_temp_directory becomes the only way to do it.
llvm-svn: 216460
|
|
|
|
|
|
| |
This reverts commit r216360.
llvm-svn: 216428
|
|
|
|
| |
llvm-svn: 216360
|
|
|
|
|
|
| |
Sorry for the noise.
llvm-svn: 215249
|
|
|
|
|
|
| |
Part of pr20544. Test to follow in a second.
llvm-svn: 215241
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
path::const_iterator claims that it's a bidirectional iterator, but it
doesn't satisfy all of the contracts for a bidirectional iterator.
For example, n3376 24.2.5 p6 says "If a and b are both dereferenceable,
then a == b if and only if *a and *b are bound to the same object",
but this doesn't work with how we stash and recreate Components.
This means that our use of reverse_iterator on this type is invalid
and leads to many of the valgrind errors we're hitting, as explained
by Tilmann Scheller here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140728/228654.html
Instead, we admit that path::const_iterator is only an input_iterator,
and implement a second input_iterator for path::reverse_iterator (by
changing const_iterator::operator-- to reverse_iterator::operator++).
All of the uses of this just traverse once over the path in one
direction or the other anyway.
llvm-svn: 214737
|
|
|
|
| |
llvm-svn: 211699
|
|
|
|
| |
llvm-svn: 211697
|
|
|
|
|
|
| |
A function to copy one file's contents to another.
llvm-svn: 211302
|
|
|
|
|
|
|
|
|
|
|
| |
While std::error_code itself seems to work OK in all platforms, there
are few annoying differences with regards to the std::errc enumeration.
This patch adds a simple llvm enumeration, which will hopefully avoid build
breakages in other platforms and surprises as we get more uses of
std::error_code.
llvm-svn: 210920
|
|
|
|
| |
llvm-svn: 210871
|
|
|
|
|
|
| |
This should make sure that most new uses use the std prefix.
llvm-svn: 210835
|
|
|
|
| |
llvm-svn: 210737
|
|
|
|
| |
llvm-svn: 210716
|
|
|
|
|
|
|
| |
This will allow inlining get_magic, which should in turn fix one of the mingw
build problems after the switch to std::error_code.
llvm-svn: 210712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea of this patch is to turn llvm/Support/system_error.h into a
transitional header that just brings in the erorr_code api to the llvm
namespace. I will remove it shortly afterwards.
The cases where the general idea needed some tweaking:
* std::errc is a namespace in msvc, so we cannot use "using std::errc". I could
add an #ifdef, but there were not that many uses, so I just added std:: to
them in this patch.
* Template specialization had to be moved to the std namespace in this
patch set already.
* The msvc implementation of default_error_condition doesn't seem to
provide the same transformations as we need. Not too surprising since
the standard doesn't actually say what "equivalent" means. I fixed the
problem by keeping our old mapping and using it at error_code
construction time.
Despite these shortcomings I think this is still a good thing. Some reasons:
* The different implementations of system_error might improve over time.
* It removes 925 lines of code from llvm already.
* It removes 6313 bytes from the text segment of the clang binary when
it is built with gcc and 2816 bytes when building with clang and
libstdc++.
llvm-svn: 210687
|
|
|
|
|
|
|
| |
There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.
llvm-svn: 209952
|
|
|
|
|
|
|
|
| |
llvm::sys::path.
http://reviews.llvm.org/D3687
llvm-svn: 208980
|
|
|
|
| |
llvm-svn: 205697
|
|
|
|
|
|
| |
is_symlink was always false since it was using stat instead of lstat.
llvm-svn: 204361
|
|
|
|
|
|
|
| |
Add the Windows COFF ARM object file magic. This enables the LLVM tools to
interact with COFF object files for Windows on ARM.
llvm-svn: 203761
|
|
|
|
|
|
|
|
|
| |
When using a //net/ path, we were transforming the trailing / into a '.'
when the path was just the root path and we were iterating backwards.
Forwards iteration and other kinds of root path (C:\, /) were already
correct.
llvm-svn: 202999
|
|
|
|
|
|
|
|
|
| |
After this I will set the default back to F_None. The advantage is that
before this patch forgetting to set F_Binary would corrupt a file on windows.
Forgetting to set F_Text produces one that cannot be read in notepad, which
is a better failure mode :-)
llvm-svn: 202052
|