summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* Try to fix ODR violation of ErrorInfo::IDReid Kleckner2016-03-241-3/+2
| | | | | | This implements my suggestion to Lang. llvm-svn: 264360
* Fix typo: XDS -> XDGSean Silva2016-03-241-3/+3
| | | | | | Patch by Robert Ma <bob1211@gmail.com>! llvm-svn: 264352
* Define ErrorInfo::ID explicitly.NAKAMURA Takumi2016-03-241-0/+3
| | | | llvm-svn: 264293
* Error.cpp: Fix a warning. [-Wpedantic]NAKAMURA Takumi2016-03-241-1/+1
| | | | llvm-svn: 264291
* [Support] Make all Errors convertible to std::error_code.Lang Hames2016-03-233-3/+46
| | | | | | | | | | | | This is a temporary crutch to enable code that currently uses std::error_code to be incrementally moved over to Error. Requiring all Error instances be convertible enables clients to call errorToErrorCode on any error (not just ECErrors created by conversion *from* an error_code). This patch also moves code for Error from ErrorHandling.cpp into a new Error.cpp file. llvm-svn: 264221
* APFloat: Fix signalling nans for scalbnMatt Arsenault2016-03-231-0/+2
| | | | llvm-svn: 264219
* APFloat: Add frexpMatt Arsenault2016-03-211-1/+25
| | | | llvm-svn: 263950
* Implement constant folding for bitreverseMatt Arsenault2016-03-211-0/+30
| | | | llvm-svn: 263945
* [MCParser] Accept uppercase radix variants 0X and 0BColin LeMahieu2016-03-181-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D14781 llvm-svn: 263802
* [Support] Add the 'Error' class for structured error handling.Lang Hames2016-03-161-0/+4
| | | | | | | | | | | | | | | | | This patch introduces the Error classs for lightweight, structured, recoverable error handling. It includes utilities for creating, manipulating and handling errors. The scheme is similar to exceptions, in that errors are described with user-defined types. Unlike exceptions however, errors are represented as ordinary return types in the API (similar to the way std::error_code is used). For usage notes see the LLVM programmer's manual, and the Error.h header. Usage examples can be found in unittests/Support/ErrorTest.cpp. Many thanks to David Blaikie, Mehdi Amini, Kevin Enderby and others on the llvm-dev and llvm-commits lists for lots of discussion and review. llvm-svn: 263609
* [CMake] Add PACKAGE_VENDOR for customizing version outputChris Bieneman2016-03-151-2/+6
| | | | | | | | | | | | Summary: This change adds a PACKAGE_VENDOR variable. When set it makes the version output more closely resemble the clang version output. Reviewers: aprantl, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18159 llvm-svn: 263566
* APFloat: Fix ilogb for denormalsMatt Arsenault2016-03-131-0/+18
| | | | llvm-svn: 263370
* APFloat: Fix scalbn handling of denormalsMatt Arsenault2016-03-131-12/+14
| | | | | | | This was incorrect for denormals, and also failed on longer exponent ranges. llvm-svn: 263369
* More UTF string conversion wrappersMarianne Mailhot-Sarrasin2016-03-112-2/+98
| | | | | | | | | | | Added new string conversion wrappers that convert between `std::string` (of UTF-8 bytes) and `std::wstring`, which is particularly useful for Win32 interop. Also fixed a missing string conversion for `getenv` on Win32, using these new wrappers. The motivation behind this is to provide the support functions required for LLDB to work properly on Windows with non-ASCII data; however, the functions are not LLDB specific. Patch by cameron314 Differential Revision: http://reviews.llvm.org/D17549 llvm-svn: 263247
* Revert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may ↵NAKAMURA Takumi2016-03-072-2/+2
| | | | | | | | check the decl instead of the versions of individual libraries." We may assume the type of 1st argument as PCSTR in PENUMLOADED_MODULES_CALLBACK. PSTR was in the ancient mingw32. llvm-svn: 262810
* Support: catch invalid accessesSaleem Abdulrasool2016-03-051-2/+2
| | | | | | | | | | | It is possible to invoke these methods on an invalid input resulting in an invalid substring construction. It seems that we do not have unit tests for these methods. Tests to ensure that the invalid call is caught to follow in clang. Resolves PR26839. llvm-svn: 262778
* Refactor duplicated code for linking with pthread.Rafael Espindola2016-03-011-3/+1
| | | | llvm-svn: 262344
* [CMAKE] Update build on recent HaikuRenato Golin2016-02-261-1/+3
| | | | | | | | | This patch updates cmake build scripts to build on Haiku. It adds Haiku x86_64 to config.guess. Please consider reviewing. Pathc by Jérôme Duval. llvm-svn: 262038
* Assert when trying to seek un-seekable raw_fd_ostream.Yaron Keren2016-02-231-0/+1
| | | | llvm-svn: 261614
* Fix LLVM's handling and detection of skylake and cannonlake CPUsSanjoy Das2016-02-211-0/+1
| | | | | | | | | | | | | | | | | Summary: - Rename `"skylake"` == SkylakeServerProc to `"skylake-avx512"` - Change `"skylake"` to denote SkylakeClientProc - Fix the detection of cpu family 6 and model 94 to be SkylakeClientProc instead of SkylakeServerProc - Remove the `"cnl"` for CannonLake Reviewers: craig.topper, delena Subscribers: zansari, echristo, qcolombet, RKSimon, spatel, DavidKreitzer, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D17090 llvm-svn: 261482
* When printing MIR, output to errs() rather than outs().Justin Lebar2016-02-191-3/+4
| | | | | | | | | | | | | | | | | | | | | Summary: Without this, this command $ llvm-run llc -stop-after machine-cp -o - <( echo '' ) outputs an error, because we close stdout twice -- once when closing the file opened for "-o", and again when closing outs(). Also clarify in the outs() definition that you can't ever call it if you want to open your own raw_fd_ostream on stdout. Reviewers: jroelofs, tstellarAMD Subscribers: jholewinski, qcolombet, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D17422 llvm-svn: 261286
* Remove uses of builtin comma operator.Richard Trieu2016-02-185-10/+21
| | | | | | Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. llvm-svn: 261270
* Simplify users of StringRef::{l,r}trim (NFC)Vedant Kumar2016-02-161-1/+1
| | | | | | | r260925 introduced a version of the *trim methods which is preferable when trimming a single kind of character. Update all users in llvm. llvm-svn: 260926
* SmallPtrSet: Avoid initializing Array in the small case.Matthias Braun2016-02-151-53/+50
| | | | | | | | | | | This patch avoids the initial memset at the cost of making iterators slightly more complex. This should be beneficial as most SmallPtrSets hold no or only a few elements, while iterating over them is less common. Differential Revision: http://reviews.llvm.org/D16672 llvm-svn: 260913
* APInt: Slightly simplify countLeadingZerosSlowCase()Matthias Braun2016-02-151-19/+8
| | | | | | | | | We always clear the unused bits in the most signifant word so there is no need to mask them out in countLeadingZerosSlowCase(). Differential Revision: http://reviews.llvm.org/D16621 llvm-svn: 260911
* APInt: Further simplify APInt::EqualSlowCase as suggested by DuncanMatthias Braun2016-02-151-4/+1
| | | | llvm-svn: 260910
* Add AMDGPU related triple vendors/OSesMatt Arsenault2016-02-131-0/+6
| | | | | | | | As support expands to more runtimes, we'll need to distinguish between more than just HSA and unknown. This also lets us stop using unknown everywhere. llvm-svn: 260790
* ARMv7k: use Cortex-A7 by default even for tvOSTim Northover2016-02-111-0/+1
| | | | | | Also actually test the default CPU from those triples. llvm-svn: 260621
* [lanai] Add Lanai triple.Jacques Pienaar2016-02-111-0/+10
| | | | | | | | | | Add triple for the Lanai backend. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend". Differential Revision: http://reviews.llvm.org/D17003 llvm-svn: 260545
* APInt: Simplify EqualSlowCaseMatthias Braun2016-02-101-15/+2
| | | | | | | | | | | | | Previously the code used getActiveBits() to determine the highest set bit of each APInt first. However doing so requires the same amount of memory accesses as simply comparing both numbers right away. Removing all the active bit checks leads to simpler code and is faster in my benchmark. Differential Revision: http://reviews.llvm.org/D16620 llvm-svn: 260447
* llvm-config: Add preliminary Windows supportEhsan Akhgari2016-02-091-27/+25
| | | | | | | | | | | | | | | | | Summary: This patch adds Windows support for a few of the llvm-config commands, including cflags, ldflags, libs, and system-libs. Currently llvm-config is untested, so this patch adds tests for the commands that it fixes as well. Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16762 llvm-svn: 260263
* [Support] Use hexdigit. NFCCraig Topper2016-02-081-3/+2
| | | | llvm-svn: 260068
* [Support] Use range-based for loop. NFCCraig Topper2016-02-041-3/+1
| | | | llvm-svn: 259763
* [Support] Use hexdigit instead of manually coding the same thing. NFCCraig Topper2016-02-041-2/+2
| | | | llvm-svn: 259762
* Fix undefined behavior when compiling in C++14 mode (with sized deletionRichard Smith2016-02-041-0/+8
| | | | | | | enabled): ensure that we do not invoke the sized deallocator for MemoryBuffer subclasses that have tail-allocated data. llvm-svn: 259735
* Shrink character buffer size in raw_ostream::write_hex to 16 characters ↵Craig Topper2016-01-311-1/+1
| | | | | | intead of 20 as that's the largest string a 64-bit hex value can be. llvm-svn: 259313
* Use std::end instead of repeating buffer sizes.Craig Topper2016-01-311-2/+2
| | | | llvm-svn: 259312
* Avoid overly large SmallPtrSet/SmallSetMatthias Braun2016-01-301-1/+1
| | | | | | | These sets perform linear searching in small mode so it is never a good idea to use SmallSize/N bigger than 32. llvm-svn: 259283
* Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith ↵Yaron Keren2016-01-293-3/+3
| | | | | | | | r259192 post commit comment. clang part in r259232, this is the LLVM part of the patch. llvm-svn: 259240
* Don't mention a command line option in an error.Rafael Espindola2016-01-281-2/+1
| | | | | | | | The program using this code may not have it. Patch by Wilfred Hughes. llvm-svn: 259106
* SmallPtrSet: Make destructor available for inliningMatthias Braun2016-01-281-5/+0
| | | | llvm-svn: 259019
* SmallPtrSet: Share some code between copy/move constructor/assignment operatorMatthias Braun2016-01-281-33/+13
| | | | llvm-svn: 259018
* SmallPtrSet: Remove trailing whitespace, fix indentationMatthias Braun2016-01-281-13/+13
| | | | llvm-svn: 259017
* SmallPtrSet: Inline the part of insert_imp in the small caseMatthias Braun2016-01-271-16/+1
| | | | | | | | | | Most of the time we only hit the small case, so it is beneficial to pull it out of the insert_imp() implementation. This improves compile time at least for non-LTO builds. Differential Revision: http://reviews.llvm.org/D16619 llvm-svn: 258908
* Fix identify_magic() to check that a file that starts with MH_MAGIC isKevin Enderby2016-01-261-2/+15
| | | | | | | | | | | | at least as big as the mach header to be identified as a Mach-O file and make sure smaller files are not identified as a Mach-O files but as unknown files. Also fix identify_magic() so it looks at all 4 bytes of the filetype field when determining the type of the Mach-O file. Then fix the macho-invalid-header test case to check that it is an unknown file and make sure it does not get the error for object_error::parse_failed. And also update the unit tests. llvm-svn: 258883
* Remove autoconf supportChris Bieneman2016-01-261-23/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; ↵Eugene Zelenko2016-01-261-2/+2
| | | | | | | | other minor fixes. Differential revision: reviews.llvm.org/D16568 llvm-svn: 258831
* [ARM] Add DSP build attribute and extension targetingBradley Smith2016-01-251-0/+1
| | | | | | | | This patch was originally committed as r257885, but was reverted due to windows failures. The cause of these failures has been fixed under r258677, hence re-committing the original patch. llvm-svn: 258683
* Added Skylake client to X86 targets and featuresElena Demikhovsky2016-01-241-3/+12
| | | | | | | | | | | | | Changes in X86.td: I set features of Intel processors in incremental form: IVB = SNB + X HSW = IVB + X .. I added Skylake client processor and defined it's features FeatureADX was missing on KNL Added some new features to appropriate processors SMAP, IFMA, PREFETCHWT1, VMFUNC and others Differential Revision: http://reviews.llvm.org/D16357 llvm-svn: 258659
* AMDGPU: Fix getArchTypePrefixMatt Arsenault2016-01-221-2/+2
| | | | llvm-svn: 258525
OpenPOWER on IntegriCloud