aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Use llvm::format instead of ftostr (which just calls sprintf).Benjamin Kramer2010-01-291-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94807 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace strcpy with memcpy when we have the length around anyway.Benjamin Kramer2010-01-281-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94746 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SMDiagnostic::Print a const method.Mikhail Glushenkov2010-01-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94672 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Mikhail Glushenkov2010-01-271-19/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94671 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo that several people pointed out. Also, address the case ofDan Gohman2010-01-261-2/+4
| | | | | | | wrapping that Duncan pointed out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94547 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment about a missed opportunity.Dan Gohman2010-01-261-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94507 91177308-0d34-0410-b5e6-96231b3b80d8
* Print empty and full sets specially.Dan Gohman2010-01-261-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94506 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to fix buffering that I forgot to commit with previous patch.Chris Lattner2010-01-221-5/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94222 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new MCAsmStreamer::GetCommentOS method to simplify stuffChris Lattner2010-01-221-0/+8
| | | | | | | that doesn't want to use twines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94199 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid printing a spurious semicolon when there is no filename.Dan Gohman2010-01-211-9/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94071 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an infinite recursion problem. dbgs() should return errs() inDavid Greene2010-01-201-2/+2
| | | | | | | release mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94001 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix refacto reported by Nicolas Geoffray.Benjamin Kramer2010-01-181-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93723 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert r93581. It was causing failures in the ExecutionEngine testsBill Wendling2010-01-161-4/+2
| | | | | | | on the build bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93606 91177308-0d34-0410-b5e6-96231b3b80d8
* BumpPtrAllocator: Have the DefaultSlabAllocator created at runtime, not ↵Ted Kremenek2010-01-151-2/+4
| | | | | | initialization time. This removes one of the 'init_constructors' reported in <rdar://problem/7545356>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93581 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce Twine::toStringRef, a variant of toVector which avoids the copy if theBenjamin Kramer2010-01-131-2/+8
| | | | | | | | twine can be represented as a single StringRef. Use the new methode to simplify some twine users. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93317 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused string functions.Benjamin Kramer2010-01-111-12/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93183 91177308-0d34-0410-b5e6-96231b3b80d8
* Add StrInStrNoCase, a StringRef version of CStrInCStrNoCase.Benjamin Kramer2010-01-111-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93174 91177308-0d34-0410-b5e6-96231b3b80d8
* Turns out llvm-gcc still uses SplitString with a vector. Add it back until IBenjamin Kramer2010-01-111-0/+12
| | | | | | | have a fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93163 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement getToken and SplitString as "StringRef helper functions"Benjamin Kramer2010-01-111-28/+18
| | | | | | | | | | - getToken is modeled after StringRef::split but it can split on multiple separator chars and skips leading seperators. - SplitString is a StringRef::split variant for more than 2 elements with the same behaviour as getToken. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93161 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress use of uninitialized variable warning.Duncan Sands2010-01-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93046 91177308-0d34-0410-b5e6-96231b3b80d8
* More trivial optimizations to a function well outside the critical pathDouglas Gregor2010-01-071-15/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92896 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch StringRef::edit_distance over to using raw pointers, since bothDouglas Gregor2010-01-071-7/+25
| | | | | | | | std::vector and llvm::SmallVector have annoying performance tradeoffs. No, I don't expect this to matter, and now it won't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92884 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92646 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92645 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-34/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92643 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92642 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92641 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92640 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92638 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92637 91177308-0d34-0410-b5e6-96231b3b80d8
* Document the edit-distance algorithm used in StringRef, switch it overDouglas Gregor2009-12-311-5/+14
| | | | | | | to SmallVector, and add a unit test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92340 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement edit distance for StringRefDouglas Gregor2009-12-301-0/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92309 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not crash when .ll printing metadata that smells like debug info, but isn't.Chris Lattner2009-12-291-46/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92268 91177308-0d34-0410-b5e6-96231b3b80d8
* fix indentation, fit in 80 cols.Chris Lattner2009-12-291-382/+382
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92267 91177308-0d34-0410-b5e6-96231b3b80d8
* fix .cpp file to not wrap the entire file in namespace blocks.Chris Lattner2009-12-291-30/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92250 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for converting to string at "natural precision", and fix someJohn McCall2009-12-241-16/+26
| | | | | | | | major bugs in long-precision conversion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92150 91177308-0d34-0410-b5e6-96231b3b80d8
* Substantially optimize APFloat::toString() by doing a single large divide toJohn McCall2009-12-241-0/+37
| | | | | | | | | | | | | | cut the significand down to the desired precision *before* entering the core divmod loop. Makes the overall algorithm logarithmic in the exponent. There's still a lot of room for improvement here, but this gets the performance back down to acceptable-for-diagnostics levels, even for long doubles. negligible, even on long doubles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92130 91177308-0d34-0410-b5e6-96231b3b80d8
* Add accessors for the largest-magnitude, smallest-magnitude, andJohn McCall2009-12-241-0/+301
| | | | | | | | | | smallest-normalized-magnitude values in a given FP semantics. Provide an APFloat-to-string conversion which I am quite ready to admit could be much more efficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92126 91177308-0d34-0410-b5e6-96231b3b80d8
* Set Remainder before Quotient in case Quotient and LHS alias. The newJohn McCall2009-12-241-1/+1
| | | | | | | | order should be immune to such problems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92124 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify how dbgs() operates.David Greene2009-12-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92083 91177308-0d34-0410-b5e6-96231b3b80d8
* sizeof(char) is always 1.Chris Lattner2009-12-231-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92079 91177308-0d34-0410-b5e6-96231b3b80d8
* De-bork CMake buildDouglas Gregor2009-12-231-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92003 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide dbgs(), a circular-buffering debug output stream. By default itDavid Greene2009-12-231-1/+55
| | | | | | | | | simply passes output to errs(). If -debug-buffer-size=N is set N > 0, dbgs() buffers its output until program termination and dumps the last N characters sent to it. This is handy when debugging very large inputs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92002 91177308-0d34-0410-b5e6-96231b3b80d8
* Add circular_raw_ostream, which buffers its output in a circular queueDavid Greene2009-12-231-0/+47
| | | | | | | | | and outputs it when explicitly flushed. The intent is to use it in situations such as debug output logging where a signal handler can take care of flushing the buffer at program termination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92001 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some methods const. The only interesting change here is thatChris Lattner2009-12-192-15/+17
| | | | | | | | | | it changes raw_fd_ostream::preferred_buffer_size to return zero on a scary stat failure instead of setting the stream to an error state. This method really should not mutate the stream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91740 91177308-0d34-0410-b5e6-96231b3b80d8
* now that libsystem no longer uses SmallVector, we can move Chris Lattner2009-12-162-0/+38
| | | | | | | | SmallVectorBase::grow_pod out of line, finally satisfying PR3758. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91529 91177308-0d34-0410-b5e6-96231b3b80d8
* Micro-optimize these functions in the case where they are not inlined.Dan Gohman2009-12-141-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91316 91177308-0d34-0410-b5e6-96231b3b80d8
* DeltaAlgorithm: Add a virtual destructor and home.Daniel Dunbar2009-12-091-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90957 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo and add missing include.Daniel Dunbar2009-12-041-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90557 91177308-0d34-0410-b5e6-96231b3b80d8
* Print a newline after the Args: line so that unrelated errs() output doesn'tDan Gohman2009-12-031-1/+2
| | | | | | | end up on the same line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90473 91177308-0d34-0410-b5e6-96231b3b80d8