summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Windows/DynamicLibrary.inc: Remove 'extern "C"' in ELM_Callback.NAKAMURA Takumi2014-09-231-1/+1
| | | | | | 'extern "C" static' is not accepted by g++-4.7. Rather to tweak, I just removed 'extern "C"', since it doesn't affect the ABI. llvm-svn: 218290
* Converting terminalHasColors mutex to a global ManagedStatic to avoid the ↵Chris Bieneman2014-09-221-2/+4
| | | | | | static destructor. llvm-svn: 218283
* In this callback ModuleName includes the file path.Yaron Keren2014-09-221-26/+5
| | | | | | | | | | | | | | | Comparing ModuleName to the file names listed will always fail. I wonder how this code ever worked and what its purpose was. Why exclude the msvc runtime DLLs but not exclude all Windows system DLLs? Anyhow, it does not function as intended. clang-formatted as well. llvm-svn: 218276
* Add hsail and amdil64 to TripleMatt Arsenault2014-09-191-5/+29
| | | | llvm-svn: 218142
* LineIterator: Provide a variant that keeps blank linesJustin Bogner2014-09-171-6/+17
| | | | | | | | It isn't always useful to skip blank lines, as evidenced by the somewhat awkward use of line_iterator in llvm-cov. This adds a knob to control whether or not to skip blanks. llvm-svn: 217960
* Fix identify_magic() with mach-o stub dylibs.Nick Kledzik2014-09-171-1/+1
| | | | | | The wrong value was returned and the unittest did not cover the stub dylib case. llvm-svn: 217933
* Fix memory leak in error paths in YAMLTraits by using unique_ptrDavid Blaikie2014-09-151-31/+21
| | | | | | | | | There's some other cleanup that could happen here, but this is at least the mechanical transformation to unique_ptr. Derived from a patch by Anton Yartsev. llvm-svn: 217803
* Add support for le64.JF Bastien2014-09-121-2/+9
| | | | | | | | | | | | | | | | | Summary: le64 is a generic little-endian 64-bit processor, mimicking le32. Depends on D5318. Test Plan: make check-all Reviewers: dschuff Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5319 llvm-svn: 217697
* Add CMake check for libatomic.Evgeniy Stepanov2014-09-121-0/+3
| | | | llvm-svn: 217666
* Support: Use llvm::COFF::BigObjMagicRui Ueyama2014-09-111-7/+15
| | | | | | | Use llvm::COFF::BigObjMagic insetad of the string literal. Also checks the version number. llvm-svn: 217633
* Support: improve identify_magic to recognize COFF bigobjRui Ueyama2014-09-111-3/+9
| | | | | | | identify_magic recognized a COFF bigobj as an import library file. This patch fixes that. llvm-svn: 217627
* Misc cleanups to the FileSytem api.Rafael Espindola2014-09-114-66/+43
| | | | | | | | | | | | | | | | 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
* typoSanjay Patel2014-09-111-1/+1
| | | | llvm-svn: 217597
* Use armv6k default for FreeBSD/ARMEd Maste2014-09-091-0/+1
| | | | | | Patch by Andrew Turner. llvm-svn: 217454
* Check whether the iterator p == the end iterator before trying to ↵Nick Lewycky2014-09-061-3/+3
| | | | | | dereference it. This is a speculative fix for a failure found on the valgrind buildbot triggered by a clang test. llvm-svn: 217295
* Fix right shift by 64 bits detected on CXX/lex/lex.literal/lex.ext/p4.cppAlexey Samsonov2014-09-061-1/+3
| | | | | | | | test case on UBSan bootstrap bot. This fixes the last failure of "check-clang" in UBSan bootstrap bot. llvm-svn: 217294
* Reapply "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to ↵Frederic Riss2014-09-051-0/+1
| | | | | | | | LanguageString()" This commit was reverted in r217183, but is OK to go in again now that its dependency is commited (as of r217186). llvm-svn: 217231
* Removed white-spaceMatthew Gardiner2014-09-051-2/+0
| | | | llvm-svn: 217230
* Adding kalimba variants as Triple sub-architectures.Matthew Gardiner2014-09-051-1/+6
| | | | | | | | Reviewed in: http://reviews.llvm.org/D5115 llvm-svn: 217229
* [ dwarfdump ] Add symbolic dump of known DWARF attribute values.Frederic Riss2014-09-041-0/+31
| | | | | | | | | | Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5187 llvm-svn: 217186
* Revert "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()"Frederic Riss2014-09-041-1/+0
| | | | | | | | This reverts commit 93c7e6161e1adbd2c7ac81fa081823183035cb64. This commit got approved first, but was dependant on another one going in (The one pretty printing attribute values). I'll reapply when the other one is in. llvm-svn: 217183
* [dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()Frederic Riss2014-09-041-0/+1
| | | | | | | | | | Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5193 llvm-svn: 217182
* Add writeFileWithSystemEncoding to LibLLVMSuppor.Rafael Espindola2014-09-034-4/+83
| | | | | | | | | | | | | | | | | | | | This patch adds to LLVMSupport the capability of writing files with international characters encoded in the current system encoding. This is relevant for Windows, where we can either use UTF16 or the current code page (the legacy Windows international characters). On UNIX, the file is always saved in UTF8. This will be used in a patch for clang to thoroughly support response files creation when calling other tools, addressing PR15171. On Windows, to correctly support internationalization, we need the ability to write response files both in UTF16 or the current code page, depending on the tool we will call. GCC for mingw, for instance, requires files to be encoded in the current code page. MSVC tools requires files to be encoded in UTF16. Patch by Rafael Auler! llvm-svn: 217068
* Removing static initializer from Debug.cpp by converting to a ManagedStatic.Chris Bieneman2014-09-031-4/+5
| | | | | | | | This is part of our larger effort to remove static initializers from LLVM libraries. Reviewed by: chandlerc llvm-svn: 217053
* Cleaning up remaining static initializers in Signals.incChris Bieneman2014-09-021-24/+31
| | | | llvm-svn: 216996
* unique_ptrify the result of SpecialCaseList::createDavid Blaikie2014-09-021-7/+8
| | | | llvm-svn: 216925
* unique_ptrify FileOutputBuffer::FileOutputBufferDavid Blaikie2014-09-021-10/+7
| | | | llvm-svn: 216921
* Revert: [APFloat] Fixed a bug in method 'fusedMultiplyAdd'.Andrea Di Biagio2014-09-021-1/+1
| | | | | | | This reverts revision 216913; the new test added at revision 216913 caused regression failures on a couple of buildbots. llvm-svn: 216914
* [APFloat] Fixed a bug in method 'fusedMultiplyAdd'.Andrea Di Biagio2014-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When folding a fused multiply-add builtin call, make sure that we propagate the correct result in the case where the addend is zero, and the two other operands are finite non-zero. Example: define double @test() { %1 = call double @llvm.fma.f64(double 7.0, double 8.0, double 0.0) ret double %1 } Before this patch, the instruction simplifier wrongly folded the builtin call in function @test to constant 'double 7.0'. With this patch, method 'fusedMultiplyAdd' correctly evaluates the multiply and propagates the expected result (i.e. 56.0). Added test fold-builtin-fma.ll with the reproducible from PR20832 plus extra test cases to verify the behavior of method 'fusedMultiplyAdd' in the presence of NaN/Inf operands. This fixes PR20832. Differential Revision: http://reviews.llvm.org/D5152 llvm-svn: 216913
* Fix some cases where StringRef was being passed by const reference. Remove ↵Craig Topper2014-08-303-15/+14
| | | | | | const from some other StringRefs since its implicitly const already. llvm-svn: 216820
* Cleaning up static initializers in Signals.incChris Bieneman2014-08-291-5/+4
| | | | | | Reviewed by: Chandlerc llvm-svn: 216704
* Cleaning up static initializers in TimeValue.Chris Bieneman2014-08-292-7/+1
| | | | | | Code reviewed by Chandlerc llvm-svn: 216703
* Return a std::unique_ptr when creating a new MemoryBuffer.Rafael Espindola2014-08-271-34/+27
| | | | llvm-svn: 216583
* yaml::Stream doesn't need to take ownership of the buffer.Rafael Espindola2014-08-271-25/+26
| | | | | | In fact, most users were already using the StringRef version. llvm-svn: 216575
* Revert "Limit the symbol search in DynamicLibrary to the module that was ↵Zachary Turner2014-08-271-9/+2
| | | | | | | | opened." This reverts commit r216563, which breaks lli's dynamic symbol resolution. llvm-svn: 216569
* Limit the symbol search in DynamicLibrary to the module that was opened.Zachary Turner2014-08-271-2/+9
| | | | | | | | Differential Revision: http://reviews.llvm.org/D5030 Reviewed By: Reid Kleckner, Rafael Espindola llvm-svn: 216563
* Add an explicit cast to pacify implicit boolean conversion warnings.Benjamin Kramer2014-08-271-1/+1
| | | | llvm-svn: 216539
* Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or ↵Craig Topper2014-08-272-6/+6
| | | | | | just letting them be implicitly created. llvm-svn: 216525
* Pass a MemoryBufferRef when we can avoid taking ownership.Rafael Espindola2014-08-261-0/+6
| | | | | | | | | | | | | The attached patch simplifies a few interfaces that don't need to take ownership of a buffer. For example, both parseAssembly and parseBitcodeFile will parse the entire buffer before returning. There is no need to take ownership. Using a MemoryBufferRef makes it obvious in the type signature that there is no ownership transfer. llvm-svn: 216488
* Merge TempDir and system_temp_directory.Rafael Espindola2014-08-263-90/+106
| | | | | | | | | We had two functions for finding the temp or cache directory. Each had a different set of smarts about OS specific APIs. With this patch system_temp_directory becomes the only way to do it. llvm-svn: 216460
* Revert "Support/APFloat: unique_ptr-ify temp arrays"Dylan Noblesmith2014-08-261-8/+11
| | | | | | This reverts commit rr216359. llvm-svn: 216429
* Revert "Support/Path: remove raw delete"Dylan Noblesmith2014-08-261-2/+2
| | | | | | This reverts commit r216360. llvm-svn: 216428
* Fix bug in llvm::sys::argumentsFitWithinSystemLimits().Rafael Espindola2014-08-251-2/+2
| | | | | | | | | | | | | This patch fixes a subtle bug in the UNIX implementation of llvm::sys::argumentsFitWithinSystemLimits() regarding the misuse of a static variable. This bug causes our cached number that stores the system command line maximum length to be halved after each call to the function. With a sufficient number of calls to this function, it will eventually report any given command line string to be over system limits. Patch by Rafael Auler. llvm-svn: 216415
* Refactor argument serialization logic when executing process. NFC.Rafael Espindola2014-08-251-13/+17
| | | | | | | | | | | | This patch refactors the argument serialization logic used in the Execute function, used to launch new Windows processes. There is a critical step that joins char** arguments into a single string, building the command line used to launch the new process, and the readability of this code is improved if this part is refactored in its own helper function. Patch by Rafael Auler! llvm-svn: 216411
* Modernize raw_fd_ostream's constructor a bit.Rafael Espindola2014-08-253-24/+15
| | | | | | | | | | Take a StringRef instead of a "const char *". Take a "std::error_code &" instead of a "std::string &" for error. A create static method would be even better, but this patch is already a bit too big. llvm-svn: 216393
* Support/Path: remove raw deleteDylan Noblesmith2014-08-251-2/+2
| | | | llvm-svn: 216360
* Support/APFloat: unique_ptr-ify temp arraysDylan Noblesmith2014-08-251-11/+8
| | | | llvm-svn: 216359
* Support: add llvm::unique_lockDylan Noblesmith2014-08-231-16/+17
| | | | | | | | | | | | | | | Based on the STL class of the same name, it guards a mutex while also allowing it to be unlocked conditionally before destruction. This eliminates the last naked usages of mutexes in LLVM and clang. It also uncovered and fixed a bug in callExternalFunction() when compiled without USE_LIBFFI, where the mutex would never be unlocked if the end of the function was reached. llvm-svn: 216338
* Support: make LLVM Mutexes STL-compatibleDylan Noblesmith2014-08-231-4/+4
| | | | | | Use lock/unlock() convention instead of acquire/release(). llvm-svn: 216336
* Support/Unix: use ScopedLock wherever possibleDylan Noblesmith2014-08-231-24/+22
| | | | | | | Only one function remains a bit too complicated for a simple mutex guard. No functionality change. llvm-svn: 216335
OpenPOWER on IntegriCloud