Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Make several symbols static. | Dan Gohman | 2008-04-10 | 2 | -23/+23 |
| | | | | llvm-svn: 49496 | ||||
* | Fix compilation errors on MSVC. Patch by Argiris Kirtzidis! | Bill Wendling | 2008-04-01 | 1 | -1/+2 |
| | | | | llvm-svn: 49055 | ||||
* | Change the MemoryBuffer::getFile* methods to take just a pointer to the | Chris Lattner | 2008-04-01 | 2 | -17/+10 |
| | | | | | | | | start of a filename, not a filename+length. All clients can produce a null terminated name, and the system api's require null terminated strings anyway. llvm-svn: 49041 | ||||
* | Reimplement MemoryBuffer::getFile with three enhancements: | Chris Lattner | 2008-04-01 | 1 | -85/+64 |
| | | | | | | | | | | | | | | | | | | | | | 1) stop using MappedFile. 2) if profitable use the sys::path::MapInFilePages api to read the file. 3) otherwise fallback to read. When sys::path::MapInFilePages is implemented, this provides several benefits: #1: this avoids fragmenting memory for small files. #2: this avoids extraneous stat calls when the file size is known. #3: this only keeps the file descriptor open while reading the file, not for the duration of the lifetime of the memory buffer. This fixes a serious clang FD 'leak' problem. I believe that this will work on a win32 machine, but I don't have one to test on. I'd appreciate it if someone could check. llvm-svn: 49031 | ||||
* | Remove the MappedFile::charBase member, rename base -> getBase() and | Chris Lattner | 2008-04-01 | 1 | -3/+4 |
| | | | | | | make getBase() return a const-correct pointer. llvm-svn: 49025 | ||||
* | Change DiffFilesWithTolerance to be written in terms of MemoryBuffer, | Chris Lattner | 2008-04-01 | 1 | -73/+56 |
| | | | | | | | | not an mmapped file. This more closely matches its requirements and provides an implicitly null terminated buffer, something this routine had to emulate itself before. llvm-svn: 49024 | ||||
* | Remove MappedFile support for mapping files for write and exec | Chris Lattner | 2008-04-01 | 2 | -3/+3 |
| | | | | | | | and shared. This complicates the design, is not used, and probably doesn't even work. llvm-svn: 49022 | ||||
* | Add explicit keywords. | Dan Gohman | 2008-03-25 | 1 | -1/+1 |
| | | | | llvm-svn: 48801 | ||||
* | A quick nm audit turned up several fixed tables and objects that were | Dan Gohman | 2008-03-25 | 2 | -2/+2 |
| | | | | | | | marked read-write. Use const so that they can be allocated in a read-only segment. llvm-svn: 48800 | ||||
* | Add assert for non-hexadecimal radixes. | Bill Wendling | 2008-03-16 | 1 | -0/+4 |
| | | | | llvm-svn: 48421 | ||||
* | Fix a typo. It's causing consumer-typeset to miscompile. Perhaps more. | Evan Cheng | 2008-03-07 | 1 | -1/+1 |
| | | | | llvm-svn: 48035 | ||||
* | Add support to APInt for shift and rotate operations with APInt | Dan Gohman | 2008-02-29 | 1 | -0/+27 |
| | | | | | | instead of uint32_t for the shift/rotate count operand type. llvm-svn: 47741 | ||||
* | Add a method to APFloat to convert directly from APInt. | Dan Gohman | 2008-02-29 | 1 | -0/+17 |
| | | | | llvm-svn: 47738 | ||||
* | Fix a bug that caused opt and other tools to silently ignore | Dan Gohman | 2008-02-23 | 1 | -1/+1 |
| | | | | | | invalid command-line options. llvm-svn: 47523 | ||||
* | Add explicit keywords. | Dan Gohman | 2008-02-20 | 1 | -2/+2 |
| | | | | llvm-svn: 47382 | ||||
* | Add 'sink' cmdline option. Patch by Mikhail Glushenkov! | Anton Korobeynikov | 2008-02-20 | 1 | -6/+18 |
| | | | | llvm-svn: 47377 | ||||
* | Unbreak build with gcc 4.3: provide missed includes and silence most ↵ | Anton Korobeynikov | 2008-02-20 | 5 | -0/+5 |
| | | | | | | annoying warnings. llvm-svn: 47367 | ||||
* | Fixed bug in APInt::Profile() where the BitWidth field was not included in the | Ted Kremenek | 2008-02-19 | 1 | -0/+2 |
| | | | | | | | profile of the APSInt object. This caused unexpected Profile collisions where none should have occurred. llvm-svn: 47338 | ||||
* | Fixed bug in FoldingSetIteratorImpl where we did not correctly check if | Ted Kremenek | 2008-02-15 | 1 | -2/+4 |
| | | | | | | | we had reached the "fake bucket" after the last bucket, allowing the iterator in some cases to run off the end of the hashtable. llvm-svn: 47178 | ||||
* | Fix a warning about comparison between signed and unsigned, | Dan Gohman | 2008-02-14 | 1 | -1/+1 |
| | | | | | | being consistent with the rest of the APInt implementation. llvm-svn: 47138 | ||||
* | Add countTrailingOnes member functions to APInt. | Dan Gohman | 2008-02-13 | 1 | -0/+12 |
| | | | | llvm-svn: 47086 | ||||
* | Added "Profile" method to APFloat for use with FoldingSet. | Ted Kremenek | 2008-02-11 | 2 | -11/+6 |
| | | | | | | | | | | Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary objects to a profile via dispatch to FoldingSetTrait<T>::Profile(). Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their functionality is now replaced using the above mentioned member template. llvm-svn: 46957 | ||||
* | Add support to FoldingSet for hashing APInt objects. | Dan Gohman | 2008-02-06 | 1 | -0/+4 |
| | | | | llvm-svn: 46833 | ||||
* | Added "bucket_iterators" to FoldingSet. Bucket iterators allow iteration | Ted Kremenek | 2008-02-04 | 1 | -1/+7 |
| | | | | | | over all the nodes in a particular bucket. llvm-svn: 46716 | ||||
* | Fixed 80 col. violation. | Ted Kremenek | 2008-02-04 | 1 | -2/+4 |
| | | | | llvm-svn: 46709 | ||||
* | Chris' change to print an approximation to long doubles | Dale Johannesen | 2008-01-31 | 1 | -1/+2 |
| | | | | | | | exposed a bug in APFloat's long double->double conversion of NaNs. Broke several things in the ieee part of gcc testsuite. llvm-svn: 46617 | ||||
* | Remove top-level const qualifiers from casts, avoiding associated | Dan Gohman | 2008-01-29 | 1 | -10/+10 |
| | | | | | | compiler warnings. llvm-svn: 46509 | ||||
* | Simplify the code and fix a typo. | Lauro Ramos Venancio | 2008-01-28 | 1 | -7/+4 |
| | | | | llvm-svn: 46458 | ||||
* | Fix fpcmp infinite loop when comparing "29-266" with "29-268". | Lauro Ramos Venancio | 2008-01-28 | 1 | -5/+21 |
| | | | | llvm-svn: 46455 | ||||
* | Added FoldingSet style 'profiling' support for APSInt. | Ted Kremenek | 2008-01-19 | 1 | -0/+23 |
| | | | | llvm-svn: 46189 | ||||
* | Added FoldingSet style 'profiling' support for APInt. | Ted Kremenek | 2008-01-19 | 1 | -1/+13 |
| | | | | llvm-svn: 46188 | ||||
* | Made 'FoldingSetNodeID' a proper class instead of a nested class in | Ted Kremenek | 2008-01-19 | 1 | -19/+19 |
| | | | | | | | | | | 'FoldingSetNodeImpl' (previously 'FoldingSetNodeID' was a typedef of 'FoldingSetNodeImpl::NodeID'). Why? Clients can now easily forward declare 'FoldingSetNodeID' without having to include FoldingSet.h. llvm-svn: 46187 | ||||
* | Remove attribution from file headers, per discussion on llvmdev. | Chris Lattner | 2007-12-29 | 25 | -50/+50 |
| | | | | llvm-svn: 45418 | ||||
* | remove attribution from lib Makefiles. | Chris Lattner | 2007-12-29 | 1 | -2/+2 |
| | | | | llvm-svn: 45415 | ||||
* | Cygwin defines uint32_t as unsigned long. Unbreak call to std::min in this case | Anton Korobeynikov | 2007-12-24 | 1 | -1/+1 |
| | | | | llvm-svn: 45342 | ||||
* | Don't have APInt.cpp depend upon DerivedTypes.h. This helps with splitting the | Reid Spencer | 2007-12-11 | 1 | -14/+23 |
| | | | | | | Support libraries separately into their own module. llvm-svn: 44852 | ||||
* | proper #include order. | Chris Lattner | 2007-12-08 | 1 | -1/+1 |
| | | | | llvm-svn: 44707 | ||||
* | Adding a StringPool data structure, which GC will use. | Gordon Henriksen | 2007-12-08 | 1 | -0/+35 |
| | | | | llvm-svn: 44705 | ||||
* | Prior commit updated wrong if, apologies. | Neil Booth | 2007-12-05 | 1 | -2/+2 |
| | | | | llvm-svn: 44614 | ||||
* | Handle zero correctly. | Neil Booth | 2007-12-05 | 1 | -3/+3 |
| | | | | llvm-svn: 44613 | ||||
* | Handle 0 correctly in string->APFloat conversion. | Dale Johannesen | 2007-12-05 | 1 | -1/+1 |
| | | | | llvm-svn: 44594 | ||||
* | Fix PR1816, by correcting the broken definition of APInt::countTrailingZeros. | Chris Lattner | 2007-11-23 | 1 | -1/+1 |
| | | | | llvm-svn: 44296 | ||||
* | Fix APInt::countTrailingZeros to return BitWidth if the input is zero ↵ | Chris Lattner | 2007-11-23 | 1 | -2/+2 |
| | | | | | | instead of returning some random large number. llvm-svn: 44294 | ||||
* | Fix the Linker testcase regressions, by making MemoryBuffer::getFileOrSTDIN ↵ | Chris Lattner | 2007-11-18 | 1 | -0/+18 |
| | | | | | | | | return a valid but empty buffer if stdin is empty. llvm-svn: 44219 | ||||
* | Fix denormal check in float->APInt conversion. | Dale Johannesen | 2007-11-17 | 1 | -1/+1 |
| | | | | | | PR 1804. llvm-svn: 44201 | ||||
* | make smallptrset more const and type correct, which caught a few | Chris Lattner | 2007-11-06 | 1 | -2/+2 |
| | | | | | | minor bugs. llvm-svn: 43782 | ||||
* | Remove some unnecessary C-style statics. | Neil Booth | 2007-11-02 | 1 | -6/+8 |
| | | | | | | Restore an assertion that arithmetic can be performed on this format. llvm-svn: 43638 | ||||
* | Add back line whose removal somehow crept into prior patch | Neil Booth | 2007-11-01 | 1 | -0/+1 |
| | | | | llvm-svn: 43627 | ||||
* | When converting to integer, do bit manipulations in the destination | Neil Booth | 2007-11-01 | 1 | -71/+107 |
| | | | | | | | | | | | memory rather than in a copy of the APFloat. This avoids problems when the destination is wider than our significand and is cleaner. Also provide deterministic values in all cases where conversion fails, namely zero for NaNs and the minimal or maximal value respectively for underflow or overflow. llvm-svn: 43626 | ||||
* | Clarified operator precedence. | Hartmut Kaiser | 2007-10-25 | 1 | -2/+2 |
| | | | | | | Silenced VC++ warning. llvm-svn: 43372 |