summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Remove sys::PathSeparator.Rafael Espindola2013-06-252-4/+0
| | | | llvm-svn: 184852
* keep only the StringRef version of getFileOrSTDIN.Rafael Espindola2013-06-251-8/+0
| | | | llvm-svn: 184826
* Don't assume ResultPath is null terminated.Rafael Espindola2013-06-251-1/+2
| | | | llvm-svn: 184824
* Cleanup in unique_file when we only want the name.Rafael Espindola2013-06-251-2/+10
| | | | | | | | | This is really ugly, but it is no worse than what we have in clang right now and it is better to get it working first and clean/optimize it afterwards. Will be tested from clang in the next patch. llvm-svn: 184802
* [APFloat] Added support for parsing float strings which contain ↵Michael Gottesman2013-06-241-0/+29
| | | | | | {inf,-inf,NaN,-NaN}. llvm-svn: 184713
* [APFloat] Added make{Zero,Inf} methods and implemented get{Zero,Inf} on top ↵Michael Gottesman2013-06-241-0/+16
| | | | | | of them. llvm-svn: 184712
* [APFloat] Removed a assert from significandParts() which says that one can ↵Michael Gottesman2013-06-241-2/+0
| | | | | | | | | | | | | | | | | only access the significand of FiniteNonZero/NaN floats. The method significandParts() is a helper method meant to ease access to APFloat's significand by allowing the user to not need to be aware of whether or not the APFloat is using memory allocated in the instance itself or in an external array. This assert says that one can only access the significand of FiniteNonZero/NaN floats. This makes it cumbersome and more importantly dangerous when one wishes to zero out the significand of a zero/infinity value since one will have to deal with the aforementioned quandary related to how the memory in APFloat is allocated. llvm-svn: 184711
* [APFloat] Rename macro convolve => PackCategoriesIntoKey so that it is clear ↵Michael Gottesman2013-06-241-86/+92
| | | | | | | | | | | | what APFloat is actually using said macro for. In the context of APFloat, seeing a macro called convolve suggests that APFloat is using said value in some sort of convolution somewhere in the source code. This is misleading. I also added a documentation comment to the macro. llvm-svn: 184710
* [APFloat] Rename llvm::exponent_t => llvm::APFloat::ExponentType.Michael Gottesman2013-06-241-5/+5
| | | | | | | | | exponent_t is only used internally in APFloat and no exponent_t values are exposed via the APFloat API. In light of such conditions it does not make any sense to gum up the llvm namespace with said type. Plus it makes it clearer that exponent_t is associated with APFloat. llvm-svn: 184686
* Revert "BlockFrequency: Saturate at 1 instead of 0 when multiplying a ↵Benjamin Kramer2013-06-211-10/+2
| | | | | | | | frequency with a branch probability." This reverts commit r184584. Breaks PPC selfhost. llvm-svn: 184590
* BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with ↵Benjamin Kramer2013-06-211-2/+10
| | | | | | | | | | | | | | | a branch probability. Zero is used by BlockFrequencyInfo as a special "don't know" value. It also causes a sink for frequencies as you can't ever get off a zero frequency with more multiplies. This recovers a 10% regression on MultiSource/Benchmarks/7zip. A zero frequency was propagated into an inner loop causing excessive spilling. PR16402. llvm-svn: 184584
* [NVPTX] Add support for selecting CUDA vs OCL mode based on tripleJustin Holewinski2013-06-211-0/+6
| | | | | | IR for CUDA should use "nvptx[64]-nvidia-cuda", and IR for NV OpenCL should use "nvptx[64]-nvidia-nvcl" llvm-svn: 184579
* Add another fixme.Rafael Espindola2013-06-201-0/+1
| | | | llvm-svn: 184488
* Remove last use of PathV1.h from Archive.cpp.Rafael Espindola2013-06-201-0/+2
| | | | llvm-svn: 184484
* make getLastModificationTime const. Move it with the other getters.Rafael Espindola2013-06-202-2/+2
| | | | llvm-svn: 184478
* Add a setLastModificationAndAccessTime to PathV2.Rafael Espindola2013-06-202-0/+21
| | | | | | With this we can remove the last use of PathV1 from llvm-ar.cpp. llvm-svn: 184464
* Add support for getting the last modification time from a file_status.Rafael Espindola2013-06-202-0/+17
| | | | | | Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus. llvm-svn: 184450
* Fix get_magic() handling of short reads.Evgeniy Stepanov2013-06-201-2/+2
| | | | | | PR16389 llvm-svn: 184434
* Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.Rafael Espindola2013-06-202-2/+2
| | | | llvm-svn: 184431
* Remove MSan hack that is no longer needed.Evgeniy Stepanov2013-06-201-2/+0
| | | | llvm-svn: 184428
* [Support/CrashRecoveryContext] Make sure CrashRecoveryContext does not clear ↵Argyrios Kyrtzidis2013-06-191-2/+11
| | | | | | | | | | | | | | | | | 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
* [APFloat] Converted all references to APFloat::isNormal => ↵Michael Gottesman2013-06-191-3/+3
| | | | | | | | APFloat::isFiniteNonZero. Turns out all the references were in llvm and not in clang. llvm-svn: 184356
* Modified the implementation of fs::GetUniqueID on Windows such that it ↵Aaron Ballman2013-06-191-9/+14
| | | | | | actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID. llvm-svn: 184351
* Remove Path::getDirectoryContents.Rafael Espindola2013-06-192-78/+0
| | | | llvm-svn: 184311
* Remove Path::isObjectFile.Rafael Espindola2013-06-191-8/+0
| | | | llvm-svn: 184305
* Remove Path::canExecute.Rafael Espindola2013-06-192-19/+0
| | | | llvm-svn: 184298
* Fixed comment typo that causes the given comment to actually make sense.Michael Gottesman2013-06-191-1/+1
| | | | llvm-svn: 184286
* Remove Path::canWrite.Rafael Espindola2013-06-182-13/+0
| | | | llvm-svn: 184235
* Add a can_write function to PathV2.Rafael Espindola2013-06-182-0/+18
| | | | llvm-svn: 184233
* Remove unused Path::canRead.Rafael Espindola2013-06-182-12/+0
| | | | llvm-svn: 184229
* Remove uniqueID from PathV1.h.Rafael Espindola2013-06-182-8/+0
| | | | llvm-svn: 184219
* Add a GetUniqueID that will replace the uniqueID of PathV1.h.Rafael Espindola2013-06-182-0/+26
| | | | llvm-svn: 184217
* Add a version of unique_file that return just the file name.Rafael Espindola2013-06-181-1/+12
| | | | llvm-svn: 184206
* Basic support for parsing Mach-O universal binaries in LLVMObject libraryAlexey Samsonov2013-06-181-2/+1
| | | | llvm-svn: 184191
* Reapply r183985 now that the missing check was added to PathV2.Rafael Espindola2013-06-171-3/+5
| | | | llvm-svn: 184120
* Only delete regular files and directories.Rafael Espindola2013-06-171-0/+16
| | | | | | | | 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
* Revert "Remove a use of PathV1.h."Rafael Espindola2013-06-171-5/+3
| | | | | | | | This reverts commit r183985. We were missing the checks for not deleting things like /dev/null. llvm-svn: 184111
* Don't use PathV1.h in LTOCodeGenerator.cppRafael Espindola2013-06-171-0/+4
| | | | | | | 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
* Fix incorrectly finding 'executable' directories instead of files.Manuel Klimek2013-06-171-1/+8
| | | | | | | | | | | | | | | 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
* Add GetCurrentDirectory back.Rafael Espindola2013-06-142-0/+21
| | | | | | | | 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
* Replace use of PathV1.h in MCContext.cpp.Rafael Espindola2013-06-142-21/+0
| | | | | | GetCurrentDirectory is now unused. Remove it. llvm-svn: 184003
* Replace use of PathV1.h in Program.cpp.Rafael Espindola2013-06-145-75/+63
| | | | llvm-svn: 183996
* Remove unused argument.Rafael Espindola2013-06-141-3/+3
| | | | llvm-svn: 183992
* Don't use PathV1.h in GraphWriter.cpp.Rafael Espindola2013-06-141-5/+2
| | | | llvm-svn: 183988
* Convert a use of sys::Path::GetTemporaryDirectory.Rafael Espindola2013-06-141-10/+9
| | | | llvm-svn: 183987
* Remove a use of PathV1.h.Rafael Espindola2013-06-141-3/+5
| | | | llvm-svn: 183985
* Remove a use of PathV1.h.Rafael Espindola2013-06-141-15/+9
| | | | llvm-svn: 183982
* Move PrependMainExecutablePath next to its only user.Rafael Espindola2013-06-141-23/+0
| | | | llvm-svn: 183980
* Remove a use of sys::Path.Rafael Espindola2013-06-141-2/+3
| | | | llvm-svn: 183979
* Try to fix the windows build.Rafael Espindola2013-06-131-1/+1
| | | | llvm-svn: 183950
OpenPOWER on IntegriCloud