1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

159 Commits

Author SHA1 Message Date
Eugene Zelenko
181555a389 [ADT, Support, TableGen] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 288424
2016-12-01 22:13:24 +00:00
Derek Schuff
30f006473b [WebAssembly] Add llvm-objdump support for wasm file format
This is the first part of an effort to add wasm binary
support across all llvm tools.

Patch by Sam Clegg

Differential Revision: https://reviews.llvm.org/D26172

llvm-svn: 288251
2016-11-30 16:49:11 +00:00
Rui Ueyama
448333cafb Add a file magic for CL.exe's object file created with /GL.
This patch makes it possible to identify object files created by CL.exe
with /GL option. Such file contains Microsoft proprietary intermediate
code instead of target machine code to do LTO.

I need this to print out user-friendly error message from LLD.

Differential Revision: https://reviews.llvm.org/D26645

llvm-svn: 286919
2016-11-15 00:54:54 +00:00
Pavel Labath
6b2a0c490c Remove TimeValue usage from llvm/Support
Summary:
This is a follow-up to D25416. It removes all usages of TimeValue from
llvm/Support library (except for the actual TimeValue declaration), and replaces
them with appropriate usages of std::chrono. To facilitate this, I have added
small utility functions for converting time points and durations into appropriate
OS-specific types (FILETIME, struct timespec, ...).

Reviewers: zturner, mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25730

llvm-svn: 284966
2016-10-24 10:59:17 +00:00
Taewook Oh
dbde0a1f7d In openFileForRead, attempt to fetch the actual name of the file on disk -- including case -- so that clang can later warn about non-portable #include and #import directives.
Differential Revision: http://reviews.llvm.org/D19842
Corresponding clang patch: http://reviews.llvm.org/D19843

Re-commit after addressing issues with of generating too many warnings for Windows and asan test failures

Patch by Eric Niebler

llvm-svn: 272555
2016-06-13 15:54:56 +00:00
Taewook Oh
798fe72f38 Revert commit r271704, a patch that enables warnings for non-portable #include and #import paths (Corresponding clang patch has been reverted by r271761). Patches are reverted because they generate lots of unadressable warnings for windows and fail tests under ASAN.
llvm-svn: 271764
2016-06-04 03:36:12 +00:00
Taewook Oh
0442d2071f In openFileForRead, attempt to fetch the actual name of the file on disk -- including case -- so that clang can later warn about non-portable #include and #import directives.
Differential Revision: http://reviews.llvm.org/D19842

Patch by Eric Niebler

llvm-svn: 271704
2016-06-03 18:38:39 +00:00
Eugene Zelenko
8694825d8f Fix some Clang-tidy readability-simplify-boolean-expr and Include What You Use warnings.
Differential revision: reviews.llvm.org/D19946

llvm-svn: 268689
2016-05-05 21:35:47 +00:00
Mehdi Amini
8d70cb6d4d Add disk_space() to llvm::fs
Summary: Adapted from Boost::filesystem.
(This is a reapply by reverting commit r265080 and fixing the WinAPI part)

Differential Revision: http://reviews.llvm.org/D18467

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265082
2016-04-01 00:18:08 +00:00
Mehdi Amini
3482078539 Revert "Add disk_space() to llvm::fs"
This reverts commit r265074 and r265068.
Breaks windows build

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265080
2016-04-01 00:13:31 +00:00
Mehdi Amini
27f076173d Use const ref instead of value for Twine in the disk_space() API
Thanks Rui for noticing!

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265074
2016-03-31 23:14:45 +00:00
Mehdi Amini
82b1e323e7 Add disk_space() to llvm::fs
Summary: Adapted from Boost::filesystem.
(This is a reapply by reverting commit r265062 and fixing the WinAPI part)

Differential Revision: http://reviews.llvm.org/D18467

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265068
2016-03-31 23:05:26 +00:00
Mehdi Amini
601ceabd04 Revert "Add disk_space() to llvm::fs"
Breaks windows bot.
This reverts commit r265050.
This reverts commit r265055.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265062
2016-03-31 21:55:35 +00:00
Simon Pilgrim
9eb6ebdd65 Wdocumentation parameter fix
llvm-svn: 265055
2016-03-31 21:13:49 +00:00
Mehdi Amini
487bf85d1f Add disk_space() to llvm::fs
Summary: Adapted from Boost::filesystem.

Reviewers: bruno, silvas

Subscribers: tberghammer, danalbert, llvm-commits, srhines

Differential Revision: http://reviews.llvm.org/D18467

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265050
2016-03-31 20:48:27 +00:00
Mehdi Amini
70409f27e8 Fix windows build for sys::fs:file_status Access Time added in r264392
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264393
2016-03-25 07:40:52 +00:00
Mehdi Amini
3103566c26 Add lastAccessedTime to file_status
Differential Revision: http://reviews.llvm.org/D18456

This is a re-commit of r264387 and r264388 after fixing a typo.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264392
2016-03-25 07:30:21 +00:00
Mehdi Amini
1ab88eb74f Revert "Add lastAccessedTime to file_status"
This reverts commit r264387.
Bots are broken in various ways, I need to take one commit at a time...

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264390
2016-03-25 06:51:43 +00:00
Mehdi Amini
63ad31425e Add lastAccessedTime to file_status
Reviewers: silvas

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D18456

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264387
2016-03-25 05:58:11 +00:00
Cameron Esfahani
20f4806ff2 NFC: Update documentation for createUniqueFile() to explain that models without an absolute path will be created in the current directory.
llvm-svn: 252265
2015-11-06 01:45:30 +00:00
Yaron Keren
9ff70960a4 Revert r250923 as config.h is not an installed header.
llvm-svn: 250924
2015-10-21 18:36:52 +00:00
Yaron Keren
f2c799b7ca Include llvm/Config/config.h in FileSystem.h as it depends upon HAVE_SYS_STAT_H which is defined (or not) in config.h.
llvm-svn: 250923
2015-10-21 18:28:35 +00:00
Benjamin Kramer
cb7a29d22e [Support] Add a version of fs::make_absolute with a custom CWD.
This will be used soon from clang.

llvm-svn: 249309
2015-10-05 13:02:43 +00:00
Reid Kleckner
a7f7730d9b ScanDirForExecutable on Windows fails to find executables with the "exe" extension in name
When the driver tries to locate a program by its name, e.g. a linker, it
scans the paths provided by the toolchain using the ScanDirForExecutable
function. If the lookup fails, the driver uses
llvm::sys::findProgramByName. Unlike llvm::sys::findProgramByName,
ScanDirForExecutable is not aware of file extensions. If the program has
the "exe" extension in its name, which is very common on Windows,
ScanDirForExecutable won't find it under the toolchain-provided paths.

This patch changes the Windows version of the "`can_execute`" function
called by ScanDirForExecutable to respect file extensions, similarly to
llvm::sys::findProgramByName.

Patch by Oleg Ranevskyy

Reviewers: rnk

Differential Revision: http://reviews.llvm.org/D12711

llvm-svn: 247358
2015-09-10 23:28:06 +00:00
NAKAMURA Takumi
1b224b5ec5 Reformat headers in ADT and Support partially.
Note, I didn't reformat entirely, but partially where I touched in previous commits.

llvm-svn: 244432
2015-08-10 04:22:36 +00:00
NAKAMURA Takumi
c1197d9021 Whitespace.
llvm-svn: 244431
2015-08-10 04:22:09 +00:00
NAKAMURA Takumi
b93b06ef3e Reformat linebreaks.
llvm-svn: 244430
2015-08-10 04:21:43 +00:00
Frederic Riss
6027545a69 Thread premissions through sys::fs::create_director{y|ies}
llvm-svn: 244268
2015-08-06 21:04:55 +00:00
Alexander Kornienko
f993659b8f Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.

llvm-svn: 240390
2015-06-23 09:49:53 +00:00
Alexander Kornienko
40cb19d802 Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:

tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
  -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
  llvm/lib/


Thanks to Eugene Kosov for the original patch!

llvm-svn: 240137
2015-06-19 15:57:42 +00:00
Benjamin Kramer
a304c427ee Mark empty default constructors as =default if it makes the type POD
NFC

llvm-svn: 234694
2015-04-11 18:57:14 +00:00
Justin Bogner
90931e63bf Object: Handle Mach-O kext bundle files
This particular subtype of Mach-O was missing. Add it.

llvm-svn: 230567
2015-02-25 22:59:20 +00:00
Aaron Ballman
0b45511a2e Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition.
llvm-svn: 229340
2015-02-15 22:54:22 +00:00
Rafael Espindola
b79a41f44b Remove the last unnecessary member variable of mapped_file_region. NFC.
llvm-svn: 224312
2014-12-16 03:10:29 +00:00
Rafael Espindola
f9c70f7fb7 Convert a member variable to a local variable. NFC.
llvm-svn: 224311
2014-12-16 02:53:35 +00:00
Rafael Espindola
a52bb2443b Remove unused member and simplify. NFC.
llvm-svn: 224309
2014-12-16 02:19:26 +00:00
Benjamin Kramer
efbac2c4ef Fix Doxygen command misspellings.
Found by -Wdocumentation.

llvm-svn: 224197
2014-12-13 19:19:07 +00:00
Rafael Espindola
cb99753ea9 Pass a FD to resise_file and add a testcase.
I will add a real use in another commit.

llvm-svn: 224136
2014-12-12 17:55:12 +00:00
Rafael Espindola
a4ea055f1a Remove a convoluted way of calling close by moving the call to the only caller.
As a bonus we can actually check the return value.

llvm-svn: 224046
2014-12-11 20:12:55 +00:00
Rafael Espindola
22caf7934c Remove dead code. NFC.
llvm-svn: 224029
2014-12-11 17:17:26 +00:00
Michael J. Spencer
312f54fa4a Support ELF files of unknown type.
llvm-svn: 222208
2014-11-18 01:14:25 +00:00
NAKAMURA Takumi
96d94f40f5 Move sys::fs::AccessMode out of @brief in the function. [-Wdocumentation]
FIXME: Annotate sys::fs::AccessMode.
llvm-svn: 217685
2014-09-12 15:12:32 +00:00
NAKAMURA Takumi
d81a9afcb0 sys::fs::access(): Fix @param [-Wdocumentation]
llvm-svn: 217684
2014-09-12 15:12:21 +00:00
Rafael Espindola
832c8a58f2 Misc cleanups to the FileSytem api.
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
2014-09-11 20:30:02 +00:00
Rafael Espindola
d326af1d4b Remove dead code. Fixes pr20544.
llvm-svn: 215243
2014-08-08 21:35:52 +00:00
Alp Toker
000fb20af5 Fix 'platform-specific' hyphenations
llvm-svn: 212056
2014-06-30 18:57:16 +00:00
Alp Toker
b76b963413 Build fix for systems without futimes/futimens
Some versions of Android don't have futimes/futimens and this code wasn't
updated during the recent errc refactoring.

Patch by Luqman Aden!

llvm-svn: 212055
2014-06-30 18:57:04 +00:00
Justin Bogner
29837f308d Support: Add llvm::sys::fs::copy_file
A function to copy one file's contents to another.

llvm-svn: 211302
2014-06-19 19:35:39 +00:00
Rafael Espindola
e0e308ff6d Don't use 'using std::error_code' in include/llvm.
This should make sure that most new uses use the std prefix.

llvm-svn: 210835
2014-06-12 21:46:39 +00:00
Rafael Espindola
38dc624425 Remove system_error.h.
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
2014-06-12 17:38:55 +00:00