David Greene
35dca86659
Fix an infinite recursion problem. dbgs() should return errs() in
...
release mode.
llvm-svn: 94001
2010-01-20 15:27:19 +00:00
Benjamin Kramer
608fd2b606
Fix refacto reported by Nicolas Geoffray.
...
llvm-svn: 93723
2010-01-18 12:40:05 +00:00
Bill Wendling
efda1e4f0f
Temporarily revert r93581. It was causing failures in the ExecutionEngine tests
...
on the build bots.
llvm-svn: 93606
2010-01-16 01:06:58 +00:00
Ted Kremenek
12821816c6
BumpPtrAllocator: Have the DefaultSlabAllocator created at runtime, not initialization time. This removes one of the 'init_constructors' reported in <rdar://problem/7545356>.
...
llvm-svn: 93581
2010-01-15 23:29:34 +00:00
Benjamin Kramer
2e06b93f43
Introduce Twine::toStringRef, a variant of toVector which avoids the copy if the
...
twine can be represented as a single StringRef. Use the new methode to simplify
some twine users.
llvm-svn: 93317
2010-01-13 12:45:23 +00:00
Benjamin Kramer
93ad708a46
Remove unused string functions.
...
llvm-svn: 93183
2010-01-11 20:33:12 +00:00
Benjamin Kramer
6bf8240762
Add StrInStrNoCase, a StringRef version of CStrInCStrNoCase.
...
llvm-svn: 93174
2010-01-11 19:45:18 +00:00
Benjamin Kramer
0ef736fef2
Turns out llvm-gcc still uses SplitString with a vector. Add it back until I
...
have a fix.
llvm-svn: 93163
2010-01-11 18:44:35 +00:00
Benjamin Kramer
c6fe3c3273
Reimplement getToken and SplitString as "StringRef helper functions"
...
- 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.
llvm-svn: 93161
2010-01-11 18:03:24 +00:00
Duncan Sands
a230552b94
Suppress use of uninitialized variable warning.
...
llvm-svn: 93046
2010-01-09 08:30:33 +00:00
Douglas Gregor
47ed966813
More trivial optimizations to a function well outside the critical path
...
llvm-svn: 92896
2010-01-07 02:24:06 +00:00
Douglas Gregor
09470e6a4e
Switch StringRef::edit_distance over to using raw pointers, since both
...
std::vector and llvm::SmallVector have annoying performance
tradeoffs. No, I don't expect this to matter, and now it won't.
llvm-svn: 92884
2010-01-07 00:51:54 +00:00
David Greene
9d24d0c3e6
Change errs() to dbgs().
...
llvm-svn: 92646
2010-01-05 01:29:03 +00:00
David Greene
649efc4656
Change errs() to dbgs().
...
llvm-svn: 92645
2010-01-05 01:28:58 +00:00
David Greene
f32fcb4d31
Change errs() to dbgs().
...
llvm-svn: 92643
2010-01-05 01:28:52 +00:00
David Greene
b28b1ed1a8
Change errs() to dbgs().
...
llvm-svn: 92642
2010-01-05 01:28:47 +00:00
David Greene
93a522baba
Change errs() to dbgs().
...
llvm-svn: 92641
2010-01-05 01:28:43 +00:00
David Greene
f92e6718bc
Change errs() to dbgs().
...
llvm-svn: 92640
2010-01-05 01:28:40 +00:00
David Greene
de7b353652
Change errs() to dbgs().
...
llvm-svn: 92638
2010-01-05 01:28:32 +00:00
David Greene
80604d5f09
Change errs() to dbgs().
...
llvm-svn: 92637
2010-01-05 01:28:29 +00:00
Douglas Gregor
5639af4eac
Document the edit-distance algorithm used in StringRef, switch it over
...
to SmallVector, and add a unit test.
llvm-svn: 92340
2009-12-31 04:24:34 +00:00
Douglas Gregor
165882c240
Implement edit distance for StringRef
...
llvm-svn: 92309
2009-12-30 17:23:44 +00:00
Chris Lattner
93163c401e
Do not crash when .ll printing metadata that smells like debug info, but isn't.
...
llvm-svn: 92268
2009-12-29 21:17:33 +00:00
Chris Lattner
0709a2790a
fix indentation, fit in 80 cols.
...
llvm-svn: 92267
2009-12-29 21:09:57 +00:00
Chris Lattner
3b32672733
fix .cpp file to not wrap the entire file in namespace blocks.
...
llvm-svn: 92250
2009-12-29 07:28:33 +00:00
John McCall
dd5044ac55
Implement support for converting to string at "natural precision", and fix some
...
major bugs in long-precision conversion.
llvm-svn: 92150
2009-12-24 23:18:09 +00:00
John McCall
e6212ace38
Substantially optimize APFloat::toString() by doing a single large divide to
...
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.
llvm-svn: 92130
2009-12-24 12:16:56 +00:00
John McCall
29b5c284ae
Add accessors for the largest-magnitude, smallest-magnitude, and
...
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.
llvm-svn: 92126
2009-12-24 08:56:26 +00:00
John McCall
bd8d1e35a6
Set Remainder before Quotient in case Quotient and LHS alias. The new
...
order should be immune to such problems.
llvm-svn: 92124
2009-12-24 08:52:06 +00:00
David Greene
b760d0cde9
Clarify how dbgs() operates.
...
llvm-svn: 92083
2009-12-23 23:23:15 +00:00
Chris Lattner
bd7b13f07f
sizeof(char) is always 1.
...
llvm-svn: 92079
2009-12-23 23:03:24 +00:00
Douglas Gregor
3ab9e5077f
De-bork CMake build
...
llvm-svn: 92003
2009-12-23 17:03:46 +00:00
David Greene
64506db8e8
Provide dbgs(), a circular-buffering debug output stream. By default it
...
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.
llvm-svn: 92002
2009-12-23 16:39:06 +00:00
David Greene
7ffbb50edf
Add circular_raw_ostream, which buffers its output in a circular queue
...
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.
llvm-svn: 92001
2009-12-23 16:08:15 +00:00
Chris Lattner
dd3e9aaad3
Make some methods const. The only interesting change here is that
...
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.
llvm-svn: 91740
2009-12-19 01:38:42 +00:00
Chris Lattner
4ea86c460a
now that libsystem no longer uses SmallVector, we can move
...
SmallVectorBase::grow_pod out of line, finally satisfying PR3758.
llvm-svn: 91529
2009-12-16 08:44:24 +00:00
Dan Gohman
fd5de58ec1
Micro-optimize these functions in the case where they are not inlined.
...
llvm-svn: 91316
2009-12-14 19:32:31 +00:00
Daniel Dunbar
d333139411
DeltaAlgorithm: Add a virtual destructor and home.
...
llvm-svn: 90957
2009-12-09 07:19:48 +00:00
Daniel Dunbar
c5b2ac4d97
Fix typo and add missing include.
...
llvm-svn: 90557
2009-12-04 08:17:07 +00:00
Dan Gohman
083f229ba2
Print a newline after the Args: line so that unrelated errs() output doesn't
...
end up on the same line.
llvm-svn: 90473
2009-12-03 19:03:18 +00:00
Daniel Dunbar
ff53d4694c
Add an implementation of the delta debugging algorithm.
...
- This is a pretty slow / memory intensive implementation, and I will likely
change it to an iterative model, but it works.
llvm-svn: 90447
2009-12-03 11:12:42 +00:00
Chris Lattner
0e3b78a6c2
return more useful error messages by using strerror to format errno
...
instead of returning an ambiguous reason.
llvm-svn: 90275
2009-12-01 22:51:41 +00:00
Douglas Gregor
7baad7365a
Perform explicit instantiations in the proper namespace, since Clang diagnoses this ill-formity.
...
llvm-svn: 89846
2009-11-25 06:04:18 +00:00
Daniel Dunbar
5a308f5399
SourceMgr: Add ShowLine argument to PrintMessage, to allow suppressing the source line output.
...
llvm-svn: 89627
2009-11-22 22:08:00 +00:00
Mikhail Glushenkov
5551c207cd
Move the handling of CommaSeparated options into ProvideOption.
...
Makes '--comma-separated val1,val2' mean the same thing as
'--comma-separated=val1,val2' (that is, 'val1' and 'val2' are not lumped
together as 'val1,val2'). Also declutters the main loop a bit.
llvm-svn: 89463
2009-11-20 17:23:17 +00:00
Daniel Dunbar
956c1581fa
Use StringRef::min instead of std::min.
...
llvm-svn: 89372
2009-11-19 18:53:18 +00:00
Mikhail Glushenkov
1d9f1fe7cc
Trailing whitespace.
...
llvm-svn: 89364
2009-11-19 17:29:36 +00:00
Edward O'Callaghan
ba993b8add
Add PS3 Triple class, Credit to John Thompson.
...
llvm-svn: 89339
2009-11-19 11:59:00 +00:00
Viktor Kutuzov
dafdd883bc
Added getArchNameForAssembler method to the Triple class for which returns OS and Vendor independent target assembler arch.
...
llvm-svn: 89122
2009-11-17 18:48:27 +00:00
Benjamin Kramer
713fd3564a
Revert CPU detection code to return "generic" instead of an empty string in case
...
of failure. The x86 target didn't like empty cpu names and broke x86 tests on
non-x86 buildbots.
llvm-svn: 89111
2009-11-17 17:57:04 +00:00