| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
This should make sure that most new uses use the std prefix.
llvm-svn: 210835
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
MSVC doesn't seem to provide any is_error_code_enum enumeration for the
windows errors.
Fortunately very few places in llvm have to handle raw windows errors, so
we can just construct the corresponding error_code directly.
llvm-svn: 210631
|
| |
|
|
|
|
|
|
| |
Add a utility function to convert the Windows path separator to Unix style path
separators. This is used by a subsequent change in clang to enable the use of
Windows SDK headers on Linux.
llvm-svn: 203611
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before this patch the unix code for creating hardlinks was unused. The code
for creating symbolic links was implemented in lib/Support/LockFileManager.cpp
and the code for creating hard links in lib/Support/*/Path.inc.
The only use we have for these is in LockFileManager.cpp and it can use both
soft and hard links. Just have a create_link function that creates one or the
other depending on the platform.
llvm-svn: 203596
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
directly, and remove the macro.
llvm-svn: 202612
|
| |
|
|
| |
llvm-svn: 202583
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 202050
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch they would take an boolean argument to say if the path
already existed. This was redundant with the returned error_code which is able
to represent that. This allowed for callers to incorrectly check only the
existed flag instead of first checking the error code.
Instead, pass in a boolean flag to say if the previous (non-)existence should be
an error or not.
Callers of the of the old simple versions are not affected. They still ignore
the previous (non-)existence as they did before.
llvm-svn: 201979
|
| |
|
|
|
|
|
|
|
| |
This will be used by the line editor library to derive a default path to
the history file.
Differential Revision: http://llvm-reviews.chandlerc.com/D2199
llvm-svn: 200594
|
| |
|
|
| |
llvm-svn: 198955
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Summary: Make identify_magic to recognize COFF import file.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2165
llvm-svn: 194852
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Some machine-type-neutral object files containing only undefined symbols
actually do exist in the Windows standard library. Need to recognize them
as COFF files.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2164
llvm-svn: 194734
|
| |
|
|
| |
llvm-svn: 194607
|
| |
|
|
| |
llvm-svn: 194605
|
| |
|
|
| |
llvm-svn: 193431
|
| |
|
|
|
|
|
|
|
| |
This fixes the incorrect implementation of iterating on file/directory
paths.
Differential Review: http://llvm-reviews.chandlerc.com/D1277
llvm-svn: 188183
|
| |
|
|
|
|
|
|
|
| |
The unix one was returning no_such_file_or_directory, but the windows one
was return success.
Update the one one caller that was depending on the old behavior.
llvm-svn: 187463
|
| |
|
|
| |
llvm-svn: 187441
|
| |
|
|
|
|
| |
This will let us use getUniqueID instead of st_dev directly on clang.
llvm-svn: 187378
|
| |
|
|
| |
llvm-svn: 187124
|
| |
|
|
| |
llvm-svn: 186676
|
| |
|
|
| |
llvm-svn: 186561
|
| |
|
|
|
|
|
| |
This centralizes the handling of O_BINARY and opens the way for hiding more
differences (like how open behaves with directories).
llvm-svn: 186447
|
| |
|
|
| |
llvm-svn: 185834
|
| |
|
|
| |
llvm-svn: 185730
|
| |
|
|
| |
llvm-svn: 185719
|
| |
|
|
|
|
|
|
|
|
|
| |
There are a few valid situation where we care about the structure inside a
directory, but not about the directory itself. A simple example is for unit
testing directory traversal.
PathV1 had a function like this, add one to V2 and port existing users of the
created temp file and delete it hack to using it.
llvm-svn: 185059
|
| |
|
|
| |
llvm-svn: 184431
|
| |
|
|
|
|
| |
actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID.
llvm-svn: 184351
|
| |
|
|
|
|
|
| |
Most clients have already been moved from Path V1 to V2. The ones using V1
now include PathV1.h explicitly.
llvm-svn: 183801
|
| |
|
|
| |
llvm-svn: 178905
|
| |
|
|
|
|
| |
to Paul Robinson!
llvm-svn: 177223
|
| |
|
|
| |
llvm-svn: 176996
|
| |
|
|
| |
llvm-svn: 169250
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rationale:
1) This was the name in the comment block. ;]
2) It matches Clang's __has_feature naming convention.
3) It matches other compiler-feature-test conventions.
Sorry for the noise. =]
I've also switch the comment block to use a \brief tag and not duplicate
the name.
llvm-svn: 168996
|
| |
|
|
| |
llvm-svn: 161979
|
| |
|
|
| |
llvm-svn: 161976
|
| |
|
|
| |
llvm-svn: 159099
|
| |
|
|
| |
llvm-svn: 159098
|
| |
|
|
|
|
| |
and add unit test. Unix is implemented. Windows side needs to be implemented.
llvm-svn: 158770
|
| |
|
|
|
|
|
| |
Original commit message:
Support/FileSystem: Implement canonicalize.
llvm-svn: 146378
|
| |
|
|
| |
llvm-svn: 146364
|
| |
|
|
| |
llvm-svn: 146363
|
| |
|
|
|
|
|
| |
end iterator.
FIXME: It should be more robust.
llvm-svn: 146294
|
| |
|
|
|
|
| |
dontlookhere check must be after it.
llvm-svn: 146217
|