summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ↵David Blaikie2014-07-191-1/+1
| | | | | | | | | | | ".reset()" It's also possible to just write "= nullptr", but there's some question of whether that's as readable, so I leave it up to authors to pick which they prefer for now. If we want to discuss standardizing on one or the other, we can do that at some point in the future. llvm-svn: 213438
* Add MIPS Technologies to the vendors in llvm::Triple.Daniel Sanders2014-07-181-0/+2
| | | | | | | | This is a prerequisite for checking for 'mti' and 'img' in a consistent way in clang. Previously 'img' could use Triple::getVendor() but 'mti' could only use Triple::getVendorName(). llvm-svn: 213381
* Refactor ARM subarchitecture parsingRenato Golin2014-07-181-0/+25
| | | | | | | | | Re-commit of a patch to rework the triple parsing on ARM to a more sane model. Patch by Gabor Ballabas. llvm-svn: 213367
* Drop the udis86 wrapper from llvm::sysAlp Toker2014-07-172-75/+0
| | | | | | | | This optional dependency on the udis86 library was added some time back to aid JIT development, but doesn't make much sense to link into LLVM binaries these days. llvm-svn: 213300
* Typo: exists -> exitsHans Wennborg2014-07-171-1/+1
| | | | llvm-svn: 213290
* Fix the prefix for arm64 tripleYi Kong2014-07-171-3/+2
| | | | | | | | | | | | Triple.cpp still returns "arm64" as prefix for arm64 triple, causing Clang not being able to select the correct GCCBuiltin IR. This patch changes the value to correct prefix "aarch64". Regression test will be added in the coming patch. Differential Revision: http://reviews.llvm.org/D4516 llvm-svn: 213240
* Perform wildcard expansion in Process::GetArgumentVector on Windows (PR17098)Hans Wennborg2014-07-161-19/+71
| | | | | | | | | | | | | | On Windows, wildcard expansion isn't performed by the shell, but left to the program itself. The common way to do this is to link with setargv.obj, which performs the expansion on argc/argv before main is entered. However, we don't use argv in Clang on Windows, but instead call GetCommandLineW so we can handle unicode arguments. This means we have to do wildcard expansion ourselves. A test case will be added on the Clang side. Differential Revision: http://reviews.llvm.org/D4529 llvm-svn: 213114
* Fix a -Wunused-local-typedefs warningAlp Toker2014-07-141-1/+1
| | | | llvm-svn: 213002
* Support: Use a range-based forJustin Bogner2014-07-141-5/+4
| | | | llvm-svn: 212973
* Move the API and implementation of clang::driver::getARMCPUForMArch() to ↵Argyrios Kyrtzidis2014-07-111-0/+82
| | | | | | | | llvm::Triple::getARMCPUForArch(). Suggested by Eric Christopher. llvm-svn: 212846
* Simplify the raw_svector_ostream tweak from r212816Alp Toker2014-07-111-13/+4
| | | | | | | | | | | | The memcpy() and overlap helps didn't help much with timings, so clean up the change. The difference at this point is that we now leave growth of the storage buffer up to SmallVector's implementation: - OS.reserve(OS.capacity() * 2); + OS.reserve(OS.size() + 64); llvm-svn: 212837
* raw_svector_ostream: grow and reserve atomicallyAlp Toker2014-07-111-15/+17
| | | | | | | | | | Including the scratch buffer size in the initial reservation eliminates the subsequent malloc+move operation and offers a healthier constant growth with less memory wastage. When doing this, take care to avoid invalidating the source buffer. llvm-svn: 212816
* Add the CSR company and the Kalimba DSP processor to Triple.Eric Christopher2014-07-101-0/+9
| | | | | | Patch by Matthew Gardiner with fixes by me. llvm-svn: 212745
* Remove move assignment operator to appease older GCCs.Peter Collingbourne2014-07-101-5/+0
| | | | llvm-svn: 212682
* Explicitly define move constructor and move assignment operator to appease MSVC.Peter Collingbourne2014-07-101-0/+9
| | | | llvm-svn: 212679
* SpecialCaseList: use std::unique_ptr.Peter Collingbourne2014-07-101-15/+3
| | | | llvm-svn: 212678
* Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics.Alexey Samsonov2014-07-092-0/+179
| | | | | | | | | | | | | | | | Turn llvm::SpecialCaseList into a simple class that parses text files in a specified format and knows nothing about LLVM IR. Move this class into LLVMSupport library. Implement two users of this class: * DFSanABIList in DFSan instrumentation pass. * SanitizerBlacklist in Clang CodeGen library. The latter will be modified to use actual source-level information from frontend (source file names) instead of unstable LLVM IR things (LLVM Module identifier). Remove dependency edge from ClangCodeGen/ClangDriver to LLVMTransformUtils. No functionality change. llvm-svn: 212643
* Add Imagination Technologies to the vendors in llvm::TripleDaniel Sanders2014-07-091-0/+2
| | | | | | | | Summary: This is a pre-requisite for supporting the mips-img-linux-gnu triple in clang. Differential Revision: http://reviews.llvm.org/D4435 llvm-svn: 212626
* SourceMgr: consistently use 'unsigned' for the memory buffer ID typeDmitri Gribenko2014-07-091-3/+3
| | | | llvm-svn: 212595
* Fix some Twine locals.Benjamin Kramer2014-07-081-3/+2
| | | | | | Two of those are use after frees. Found by clang-tidy, fixed by me. llvm-svn: 212537
* Revert "Refactor ARM subarchitecture parsing"Renato Golin2014-07-081-23/+0
| | | | | | This reverts commit 7b4a6882467e7fef4516a0cbc418cbfce0fc6f6d. llvm-svn: 212521
* Refactor ARM subarchitecture parsingRenato Golin2014-07-071-0/+23
| | | | | | | | | According to a FIXME in ARMMCTargetDesc.cpp the ARM version parsing should be in the Triple helper class. Patch by: Gabor Ballabas llvm-svn: 212479
* Update the MemoryBuffer API to use ErrorOr.Rafael Espindola2014-07-065-86/+74
| | | | llvm-svn: 212405
* SourceMgr: make valid buffer IDs start from oneAlp Toker2014-07-061-15/+16
| | | | | | | | | | Use 0 for the invalid buffer instead of -1/~0 and switch to unsigned representation to enable more idiomatic usage. Also introduce a trivial SourceMgr::getMainFileID() instead of hard-coding 0/1 to identify the main file. llvm-svn: 212398
* Remove obsolete function TargetRegistry::getClosestTargetForJIT()Alp Toker2014-07-011-11/+0
| | | | | | | This was kept around "for compatibility through 2.6" in 2009 and is not used or tested. llvm-svn: 212095
* Refactor the code in clang to find a file in a PATH like environment ↵Ehsan Akhgari2014-06-301-0/+30
| | | | | | variable into a helper function llvm-svn: 212057
* Fix 'platform-specific' hyphenationsAlp Toker2014-06-301-1/+1
| | | | llvm-svn: 212056
* Build fix for systems without futimes/futimensAlp Toker2014-06-301-1/+1
| | | | | | | | | 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
* lldb can interrupt waitpid, so EINTR shouldn't be an error. This fixes the caseJulien Lerouge2014-06-271-1/+5
| | | | | | | | | | where there is no timeout. In the case where there is a timeout though, the code is still wrong since it doesn't check that the alarm really went off. Without this patch, I cannot debug a program that forks itself using sys::ExecuteAndWait with lldb. llvm-svn: 211918
* Re-apply r211287: Remove support for LLVM runtime multi-threading.Chandler Carruth2014-06-271-26/+3
| | | | | | | I'll fix the problems in libclang and other projects in ways that don't require <mutex> until we sort out the cygwin situation. llvm-svn: 211900
* Revert "Introduce a string_ostream string builder facilty"Alp Toker2014-06-262-19/+19
| | | | | | Temporarily back out commits r211749, r211752 and r211754. llvm-svn: 211814
* Add support for ppc64/power8 as a hostWill Schmidt2014-06-261-0/+2
| | | | llvm-svn: 211781
* Introduce a string_ostream string builder faciltyAlp Toker2014-06-262-19/+19
| | | | | | | | | | | | | | | | | | | | string_ostream is a safe and efficient string builder that combines opaque stack storage with a built-in ostream interface. small_string_ostream<bytes> additionally permits an explicit stack storage size other than the default 128 bytes to be provided. Beyond that, storage is transferred to the heap. This convenient class can be used in most places an std::string+raw_string_ostream pair or SmallString<>+raw_svector_ostream pair would previously have been used, in order to guarantee consistent access without byte truncation. The patch also converts much of LLVM to use the new facility. These changes include several probable bug fixes for truncated output, a programming error that's no longer possible with the new interface. llvm-svn: 211749
* For CrashRecoveryContext::RunSafelyOnThread, propagate Darwin's ↵Argyrios Kyrtzidis2014-06-251-2/+21
| | | | | | | | | | | | PRIO_DARWIN_BG to the new thread if it is set on the calling thread. This allows libclang's indexing threads to propagate their priority to the clang module building threads. rdar://17459872 llvm-svn: 211747
* Random Number Generator (llvm)JF Bastien2014-06-252-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | Provides an abstraction for a random number generator (RNG) that produces a stream of pseudo-random numbers. The current implementation uses C++11 facilities and is therefore not cryptographically secure. The RNG is salted with the text of the current command line invocation. In addition, a user may specify a seed (reproducible builds). In clang, the seed can be set via -frandom-seed=X In the back end, the seed can be set via -rng-seed=X This is the llvm part of the patch. clang part: D3391 URL: http://reviews.llvm.org/D3390 Author: yln I'm landing this for the second time, it broke Windows bots the first time around. llvm-svn: 211705
* Don't leak a file descriptor.Rafael Espindola2014-06-251-1/+1
| | | | llvm-svn: 211699
* Code cleanup.Logan Chien2014-06-251-1/+1
| | | | llvm-svn: 211697
* Use SourceMgr::getMemoryBuffer() in a couple of placesAlp Toker2014-06-251-2/+2
| | | | | | Cleanup only. llvm-svn: 211656
* Revert: r211588 - [mips] Use __clear_cache builtin instead of cacheflush() ↵Daniel Sanders2014-06-241-2/+10
| | | | | | | | | | | | in Unix Memory::InvalidateInstructionCache() Buildbot reports a test failure on the llvm-mips-linux builder and blames r211588. Although it doesn't appear in the blamelist, it seems it could also be r211587 (because it's committed to compiler-rt?) since they were tested together. Reverting the most likely suspect (r211588) to confirm one way or the other. llvm-svn: 211594
* Revert r211287, "Remove support for LLVM runtime multi-threading."NAKAMURA Takumi2014-06-241-3/+26
| | | | | | libclang still requires it on cygming, lack of incomplete <mutex>. llvm-svn: 211592
* [mips] Use __clear_cache builtin instead of cacheflush() in Unix ↵Daniel Sanders2014-06-241-10/+2
| | | | | | | | | | Memory::InvalidateInstructionCache() MIPS64 Android bionic has removed cacheflush(). Use __clear_cache() instead for 32-bit and 64-bit MIPS Patch by Duane Sand <Duane.Sand@imgtec.com> llvm-svn: 211588
* Support: Move class ScaledNumberDuncan P. N. Exon Smith2014-06-241-0/+187
| | | | | | | | ScaledNumber has been cleaned up enough to pull out of BFI now. Still work to do there (tests for shifting, bloated printing code, etc.), but it seems clean enough for its new home. llvm-svn: 211562
* Recommit 211309 (StringMap::insert), reverted in 211328 due to issues with ↵David Blaikie2014-06-231-2/+8
| | | | | | | | | | | | private, but non-deleted, move members. Certain versions of GCC (~4.7) couldn't handle the SFINAE on access control, but with "= delete" (hidden behind a macro for portability) this issue is worked around/addressed. Patch by Agustín Bergé llvm-svn: 211525
* Support: Extract ScaledNumbers::compare()Duncan P. N. Exon Smith2014-06-231-0/+13
| | | | llvm-svn: 211507
* Fix the MinGW builder. Apparently std::call_once andZachary Turner2014-06-211-17/+10
| | | | | | | | std::recursive_mutex are not available on MinGW and breaks the builder. Revert to using a function local static and sys::Mutex just to get the tree green until we figure out a better solution. llvm-svn: 211424
* Support: Write ScaledNumber::getQuotient() and getProduct()Duncan P. N. Exon Smith2014-06-202-0/+120
| | | | llvm-svn: 211409
* Fix .cpp files claiming to be header filesHans Wennborg2014-06-205-5/+5
| | | | llvm-svn: 211334
* Revert "Add StringMap::insert(pair) consistent with the standard associative ↵Rafael Espindola2014-06-201-8/+2
| | | | | | | | | | | | container concept." This reverts commit r211309. It looks like it broke some bots: http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/15563/steps/compile/logs/stdio llvm-svn: 211328
* Add StringMap::insert(pair) consistent with the standard associative ↵David Blaikie2014-06-191-2/+8
| | | | | | | | container concept. Patch by Agustín Bergé. llvm-svn: 211309
* Support: Add llvm::sys::fs::copy_fileJustin Bogner2014-06-191-0/+34
| | | | | | A function to copy one file's contents to another. llvm-svn: 211302
OpenPOWER on IntegriCloud