Rafael Espindola
1efb69cdca
Add another fixme.
...
llvm-svn: 184488
2013-06-20 22:07:53 +00:00
Rafael Espindola
e34d6a5fac
Remove last use of PathV1.h from Archive.cpp.
...
llvm-svn: 184484
2013-06-20 22:02:10 +00:00
Rafael Espindola
be3ede7958
make getLastModificationTime const. Move it with the other getters.
...
llvm-svn: 184478
2013-06-20 21:51:49 +00:00
Rafael Espindola
4a3365c869
Add a setLastModificationAndAccessTime to PathV2.
...
With this we can remove the last use of PathV1 from llvm-ar.cpp.
llvm-svn: 184464
2013-06-20 20:56:14 +00:00
Rafael Espindola
db5d8feeea
Add support for getting the last modification time from a file_status.
...
Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus.
llvm-svn: 184450
2013-06-20 18:42:04 +00:00
Evgeniy Stepanov
6eb4484319
Fix get_magic() handling of short reads.
...
PR16389
llvm-svn: 184434
2013-06-20 15:56:05 +00:00
Rafael Espindola
7cf7c51cc4
Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.
...
llvm-svn: 184431
2013-06-20 15:06:35 +00:00
Evgeniy Stepanov
ca692609d0
Remove MSan hack that is no longer needed.
...
llvm-svn: 184428
2013-06-20 14:19:10 +00:00
Argyrios Kyrtzidis
f1d8f52a36
[Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear the thread-local "CurrentContext"
...
in the "parent" thread, when we are using CrashRecoveryContext::RunSafelyOnThread.
When using CrashRecoveryContext::RunSafelyOnThread, we would set a CrashRecoveryContextImpl* to a thread-local variable
for the "child" thread, but CrashRecoveryContext would erroneously clear it in the "parent" thread.
The result was that if CrashRecoveryContext::RunSafelyOnThread was called again in the "child" thread it would mess up
crash-recovery for its parent.
A test for this will be added in the clang repository.
rdar://14204560
llvm-svn: 184380
2013-06-19 22:53:45 +00:00
Michael Gottesman
3cb77ab98a
[APFloat] Converted all references to APFloat::isNormal => APFloat::isFiniteNonZero.
...
Turns out all the references were in llvm and not in clang.
llvm-svn: 184356
2013-06-19 21:23:18 +00:00
Aaron Ballman
9fbe530d74
Modified the implementation of fs::GetUniqueID on Windows such that it actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID.
...
llvm-svn: 184351
2013-06-19 21:03:50 +00:00
Rafael Espindola
02d0ec8e70
Remove Path::getDirectoryContents.
...
llvm-svn: 184311
2013-06-19 15:32:37 +00:00
Rafael Espindola
6d1e379158
Remove Path::isObjectFile.
...
llvm-svn: 184305
2013-06-19 14:25:38 +00:00
Rafael Espindola
988252dcd2
Remove Path::canExecute.
...
llvm-svn: 184298
2013-06-19 13:25:31 +00:00
Michael Gottesman
a7cc1243cc
Fixed comment typo that causes the given comment to actually make sense.
...
llvm-svn: 184286
2013-06-19 07:34:21 +00:00
Rafael Espindola
2bf893664b
Remove Path::canWrite.
...
llvm-svn: 184235
2013-06-18 21:10:03 +00:00
Rafael Espindola
a1280c16fb
Add a can_write function to PathV2.
...
llvm-svn: 184233
2013-06-18 20:56:38 +00:00
Rafael Espindola
3025f2366f
Remove unused Path::canRead.
...
llvm-svn: 184229
2013-06-18 20:42:25 +00:00
Rafael Espindola
8f181a5406
Remove uniqueID from PathV1.h.
...
llvm-svn: 184219
2013-06-18 19:46:19 +00:00
Rafael Espindola
45e6c2406d
Add a GetUniqueID that will replace the uniqueID of PathV1.h.
...
llvm-svn: 184217
2013-06-18 19:34:49 +00:00
Rafael Espindola
4526b1d410
Add a version of unique_file that return just the file name.
...
llvm-svn: 184206
2013-06-18 17:01:00 +00:00
Alexey Samsonov
e6388e622e
Basic support for parsing Mach-O universal binaries in LLVMObject library
...
llvm-svn: 184191
2013-06-18 15:03:28 +00:00
Rafael Espindola
702a80c72f
Reapply r183985 now that the missing check was added to PathV2.
...
llvm-svn: 184120
2013-06-17 20:37:56 +00:00
Rafael Espindola
8cd62b01ef
Only delete regular files and directories.
...
This ports a missing feature from PathV1.h. I am not sure how to test this
with the regular infrastructure, but an Apple bot should check this when
r183985 is reapplied.
llvm-svn: 184119
2013-06-17 20:35:51 +00:00
Rafael Espindola
7648aa3558
Revert "Remove a use of PathV1.h."
...
This reverts commit r183985.
We were missing the checks for not deleting things like /dev/null.
llvm-svn: 184111
2013-06-17 19:54:17 +00:00
Rafael Espindola
40c908bfad
Don't use PathV1.h in LTOCodeGenerator.cpp
...
This patch also adds a simpler version of sys::fs::remove and a tool_output_file
constructor for when we already have an open file.
llvm-svn: 184095
2013-06-17 18:05:35 +00:00
Manuel Klimek
52772bf356
Fix incorrectly finding 'executable' directories instead of files.
...
This broke for example the 'not' utility, if a directory called
'FileCheck' is executable and in the path before the actual 'FileCheck'.
This patch steals the implementation of the "old" PathV1 canExecute
implementation:
- checks for R_OK (file readable): this is necessary for executing
scripts; we should not regress here unless we have good reasons
- checks for S_ISREG; if we want to get rid of this, we'd need to
change all callers who already made the assumption when depending
on Path V1.
llvm-svn: 184074
2013-06-17 10:48:34 +00:00
Rafael Espindola
158d537c5a
Add GetCurrentDirectory back.
...
It looks like clang-tools-extra/unittests/cpp11-migrate/TransformTest.cpp
depends on the behaviour of the old one on Windows. Maybe a difference
between GetCurrentDirectoryA and GetCurrentDirectoryW?
llvm-svn: 184009
2013-06-14 21:41:33 +00:00
Rafael Espindola
ef03b9fc52
Replace use of PathV1.h in MCContext.cpp.
...
GetCurrentDirectory is now unused. Remove it.
llvm-svn: 184003
2013-06-14 20:26:58 +00:00
Rafael Espindola
b0a5c96379
Replace use of PathV1.h in Program.cpp.
...
llvm-svn: 183996
2013-06-14 19:38:45 +00:00
Rafael Espindola
f7c67014f3
Remove unused argument.
...
llvm-svn: 183992
2013-06-14 18:12:13 +00:00
Rafael Espindola
3e3e040574
Don't use PathV1.h in GraphWriter.cpp.
...
llvm-svn: 183988
2013-06-14 17:11:14 +00:00
Rafael Espindola
6a6f04a3b6
Convert a use of sys::Path::GetTemporaryDirectory.
...
llvm-svn: 183987
2013-06-14 16:43:15 +00:00
Rafael Espindola
ca635dc92c
Remove a use of PathV1.h.
...
llvm-svn: 183985
2013-06-14 16:20:18 +00:00
Rafael Espindola
5023632c9a
Remove a use of PathV1.h.
...
llvm-svn: 183982
2013-06-14 15:24:56 +00:00
Rafael Espindola
b786304fea
Move PrependMainExecutablePath next to its only user.
...
llvm-svn: 183980
2013-06-14 15:12:13 +00:00
Rafael Espindola
9aa3d5d7b2
Remove a use of sys::Path.
...
llvm-svn: 183979
2013-06-14 13:59:21 +00:00
Rafael Espindola
5f81f48bd4
Try to fix the windows build.
...
llvm-svn: 183950
2013-06-13 21:38:21 +00:00
Rafael Espindola
4f35da77a6
Don't use PathV1.h in Signals.h.
...
llvm-svn: 183947
2013-06-13 21:16:58 +00:00
Rafael Espindola
280e5cb653
Don't use PathV1.h in FileUtilities.h.
...
llvm-svn: 183941
2013-06-13 20:41:00 +00:00
Rafael Espindola
7c1023ad27
Avoid using PathV1.h in Program.h.
...
llvm-svn: 183940
2013-06-13 20:25:38 +00:00
Rafael Espindola
6828fe475a
Add a version of sys::ExecuteAndWait that takes StringRefs.
...
llvm-svn: 183934
2013-06-13 20:06:28 +00:00
Rafael Espindola
4c7ad8fc27
Have sys::FindProgramByName return a std::string.
...
llvm-svn: 183928
2013-06-13 19:25:37 +00:00
Rafael Espindola
04fa5c17d8
Covert remaining graph viewers from sys::Path to std::string.
...
llvm-svn: 183921
2013-06-13 17:32:16 +00:00
Rafael Espindola
48944e7a9a
Update code for other graph viewing programs too.
...
llvm-svn: 183920
2013-06-13 17:27:45 +00:00
Rafael Espindola
ce61b1e5b1
Reduce usage of sys::Path in the graph writer.
...
Now PathV1.h is not needed in GraphWriter.h.
llvm-svn: 183919
2013-06-13 17:20:48 +00:00
Reid Kleckner
6e6a0f50b3
[Support] Fix handle and memory leak for processes that are not waited for
...
Execute's Data parameter is now optional, so we won't allocate memory
for it on Windows and we'll close the process handle.
The Unix code should probably do something similar to avoid accumulation
of zombie children that haven't been waited on.
Tested on Linux and Windows.
llvm-svn: 183906
2013-06-13 15:27:17 +00:00
Aaron Ballman
54e9bd2239
Zero-initializing variables; fixes a build breakage introduced in r183864.
...
llvm-svn: 183904
2013-06-13 14:39:07 +00:00
Rafael Espindola
0c24b20d33
[Win] Put ChangeStdinToBinary ChangeStdoutToBinary ChangeStderrToBinary in sys.
...
llvm-svn: 183868
2013-06-12 21:25:04 +00:00
Rafael Espindola
2bb2aa27bf
s/Void/void.
...
llvm-svn: 183866
2013-06-12 21:16:07 +00:00