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
Rafael Espindola
404ae77e38
Attempt at fixing the windows build.
...
llvm-svn: 183865
2013-06-12 21:11:50 +00:00
Rafael Espindola
cb2eca0f91
Remove the program class.
...
It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just
those two functions and make Execute and Wait implementations details.
llvm-svn: 183864
2013-06-12 20:58:35 +00:00
Rafael Espindola
385c06ffc9
Don't use PathV1 in CommandLine.cpp.
...
No functionality change.
llvm-svn: 183842
2013-06-12 15:37:27 +00:00
Rafael Espindola
71affba988
Inline Path::isBitcodeFile into only use and remove it.
...
llvm-svn: 183840
2013-06-12 15:13:57 +00:00
Rafael Espindola
b703be2544
Remove Path::getMagicNumber.
...
llvm-svn: 183839
2013-06-12 15:07:11 +00:00
Rafael Espindola
e3e790a46e
Remove Path::hasMagicNumber.
...
llvm-svn: 183838
2013-06-12 15:04:59 +00:00
Rafael Espindola
af93517dde
Remove Path::isAbsolute.
...
llvm-svn: 183836
2013-06-12 15:02:39 +00:00
Rafael Espindola
87b03450ee
Remove Path::isAbsolute().
...
llvm-svn: 183835
2013-06-12 14:47:33 +00:00
Rafael Espindola
46e2ea64cc
Remove Path::getSuffix.
...
llvm-svn: 183833
2013-06-12 14:32:51 +00:00
Rafael Espindola
ec4f0fc7c1
Remove sys::CopyFile.
...
llvm-svn: 183831
2013-06-12 14:16:52 +00:00
Patrik Hagglund
7e79636e19
Fix 'gcc -flto' builds for unittest binaries (undefined reference to
...
`typeinfo for llvm:🆑 :GenericOptionValue').
Remove an "anchor" method for an abstract class. (This does not
increase the number of vtables.)
llvm-svn: 183830
2013-06-12 14:15:21 +00:00
Rafael Espindola
d88308767b
Remove the old file memory mapping functions.
...
llvm-svn: 183828
2013-06-12 14:11:15 +00:00
Rafael Espindola
1d08f5ae7c
Remove Path::createFileOnDisk.
...
llvm-svn: 183827
2013-06-12 13:59:17 +00:00
Rafael Espindola
d5fd942ec3
Remove Path::makeExecutableOnDisk.
...
llvm-svn: 183826
2013-06-12 13:55:07 +00:00
Rafael Espindola
3bc8e71909
Move PathV2.h to Path.h
...
Most clients have already been moved from Path V1 to V2. The ones using V1
now include PathV1.h explicitly.
llvm-svn: 183801
2013-06-11 22:21:28 +00:00
Tobias Grosser
bd9e549e21
Make host ARM CPU feature detection independent of the vendor
...
For ARM on linux we use /proc/cpuinfo to detect the host CPU's features.
Linux derives these values without ever looking at the vendor of the
specific CPU implementation. Hence, it adds little value, if we parse
the output of /proc/cpuinfo only for certain vendors.
This patch enables us to derive the correct feature flags e.g. for Qualcomm
CPUs.
llvm-svn: 183790
2013-06-11 21:45:01 +00:00
Rafael Espindola
d1fcac9126
Include PathV1.h in files that use it.
...
This is preparation for replacing Path.h with PathV2.h.
llvm-svn: 183782
2013-06-11 20:00:56 +00:00
Rafael Espindola
c656225b9d
Remove Path::getDirname.
...
llvm-svn: 183780
2013-06-11 19:32:57 +00:00