Daniel Dunbar
38460e2596
Fix __crashreport_info__ declaration.
...
llvm-svn: 104300
2010-05-20 23:50:19 +00:00
Dan Gohman
434b54846d
Add a comment explaining why this code uses Append mode.
...
llvm-svn: 104095
2010-05-19 01:21:34 +00:00
Dan Gohman
393fa6e0a2
Usage of O_NONBLOCK in bjam is now confirmed as a bug and fixed upstream.
...
Update the comment.
llvm-svn: 104021
2010-05-18 15:25:14 +00:00
Chris Lattner
a1f4042939
improve portability to systems that don't have round, patch by
...
Evzen Muller!
llvm-svn: 103877
2010-05-15 17:11:55 +00:00
Daniel Dunbar
00f50519b6
Add new configure option, --disable-timestamps, intended to turn off anything which would mess up binary/object comparisons. Currently:
...
- Disables 'Built on ...' in 'foo --version'.
- Disables timestamps from being embedded into .dir files.
llvm-svn: 103423
2010-05-10 20:11:56 +00:00
Daniel Dunbar
ddfbf5658d
Run interrupt routines as part of report_fatal_error, since we are failing
...
ungracefully.
llvm-svn: 103334
2010-05-08 02:10:36 +00:00
Dan Gohman
783a114a69
Handle the case where open(2) or close(2) is interrupted by a signal when
...
automatic syscall restarting is disabled.
Also, fix the build on systems which don't define EWOULDBLOCK.
llvm-svn: 103158
2010-05-06 02:06:20 +00:00
Dan Gohman
3a3eadef40
Handle EWOULDBLOCK as EAGAIN. And add a comment explaining why
...
EAGAIN and EWOULDBLOCK are used here.
Also, handle the case where a write call is interrupted after
some data has already been written.
llvm-svn: 103153
2010-05-06 01:27:36 +00:00
Chris Lattner
b9f858943a
Implement rdar://7415680 - Twine integer support lacks greatness
...
Microoptimize Twine's with unsigned and int to not pin their value to
the stack. This saves stack space in common cases and allows mem2reg
in the caller. A simple example is:
void foo(const Twine &);
void bar(int x) {
foo("xyz: " + Twine(x));
}
Before:
__Z3bari:
subq $40, %rsp
movl %edi, 36(%rsp)
leaq L_.str3(%rip), %rax
leaq 36(%rsp), %rcx
leaq 8(%rsp), %rdi
movq %rax, 8(%rsp)
movq %rcx, 16(%rsp)
movb $3, 24(%rsp)
movb $7, 25(%rsp)
callq __Z3fooRKN4llvm5TwineE
addq $40, %rsp
ret
After:
__Z3bari:
subq $24, %rsp
leaq L_.str3(%rip), %rax
movq %rax, (%rsp)
movslq %edi, %rax
movq %rax, 8(%rsp)
movb $3, 16(%rsp)
movb $7, 17(%rsp)
leaq (%rsp), %rdi
callq __Z3fooRKN4llvm5TwineE
addq $24, %rsp
ret
It saves 16 bytes of stack and one instruction in this case.
llvm-svn: 103107
2010-05-05 18:40:33 +00:00
Benjamin Kramer
8712466dd6
Try again if write(2) reports an recoverable error.
...
This should fix mysteriously crashing boost regression tests when stderr is
managed by bjam (PR7043).
llvm-svn: 103085
2010-05-05 15:17:47 +00:00
Devang Patel
2a21d92744
Fix typo. add a test case.
...
llvm-svn: 101812
2010-04-19 20:31:39 +00:00
Devang Patel
06123c1012
Add DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.
...
llvm-svn: 101805
2010-04-19 19:14:02 +00:00
Chris Lattner
f543d5e029
reduce indentation
...
llvm-svn: 101692
2010-04-18 03:35:23 +00:00
Dan Gohman
d48633d340
Fix a bunch of namespace polution.
...
llvm-svn: 101376
2010-04-15 17:08:50 +00:00
Benjamin Kramer
a4c5712b41
BumpPtrAllocator::Reset() doesn't need to allocate anything. (Thanks, Jakob)
...
llvm-svn: 101138
2010-04-13 16:38:06 +00:00
Benjamin Kramer
4ca6d372d5
Let BumpPtrAllocator lazily allocate the first slab.
...
We have some code in llvm and clang where a BumpPtrAllocator is declared in a
class but never used in the common case. Stop wasting memory there.
llvm-svn: 101130
2010-04-13 14:41:51 +00:00
Chris Lattner
72bc852ebe
Fix PR6826: GraphWriter delete the generated file before "dotty" load it,
...
patch by 'ether'.
llvm-svn: 101116
2010-04-13 04:35:39 +00:00
Chris Lattner
9d77e5ba47
add minix support, patch by Kees van Reeuwijk! PR6797
...
llvm-svn: 100895
2010-04-09 20:45:04 +00:00
Chris Lattner
cd7b368e65
clean this up, fix std::min ambiguity on some platforms.
...
llvm-svn: 100894
2010-04-09 20:43:54 +00:00
Benjamin Kramer
3b7602b1fb
Various MSVC warning fixes about truncated 64 bit shifts and const pointers passed to free.
...
llvm-svn: 100767
2010-04-08 15:25:57 +00:00
Chris Lattner
ea8b374616
rename llvm_install_error_handler -> install_fatal_error_handler
...
and friends.
llvm-svn: 100717
2010-04-07 23:12:29 +00:00
Chris Lattner
80b41881bc
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
c83a42075b
enhance SMDiagnostic to also maintain a pointer to the SourceMgr.
...
Add a simplified constructor for clients that don't have locations
like "file not found" errors.
llvm-svn: 100538
2010-04-06 18:06:18 +00:00
Chris Lattner
48d30a3011
give the SourceMgr object a cookie.
...
llvm-svn: 100504
2010-04-06 00:33:43 +00:00
Chris Lattner
117d05ca0e
Give llvm::SourceMgr the ability to have a client-specified
...
diagnostic handler.
llvm-svn: 100503
2010-04-06 00:26:48 +00:00
Chris Lattner
269737461d
stringref-ize the MemoryBuffer::get apis. This requires
...
a co-committed clang patch.
llvm-svn: 100485
2010-04-05 22:42:30 +00:00
Owen Anderson
3694d62450
Push const through the regex engine. Fixes some of the warnings in PR6616.
...
llvm-svn: 100438
2010-04-05 17:50:20 +00:00
Benjamin Kramer
1ef6689d58
Remove accidental include and add a comment.
...
llvm-svn: 100107
2010-04-01 14:39:55 +00:00
Benjamin Kramer
71eaf27165
Various improvements to MemoryBuffer::getFile:
...
- Use a RAII object to close the FD.
- Use sys::StrError instead of thread-unsafe strerror calls.
- Recover gracefully if read returns zero. This works around an issue on
DragonFlyBSD where /dev/null has an st_size of 136 but we can't read 136 bytes
from it.
llvm-svn: 100106
2010-04-01 14:35:22 +00:00
Benjamin Kramer
4b94ce229d
Introduce SpecificBumpPtrAllocator, a wrapper for BumpPtrAllocator which allows
...
only a single type of object to be allocated. Use it to make VNInfo destruction
typesafe.
llvm-svn: 99919
2010-03-30 20:16:45 +00:00
Douglas Gregor
63f8158cff
Introduce namespace-scope functions to enable LLVM statistics without
...
passing the command-line parameter "-stats" and to print the resulting
statistics without calling llvm_shutdown().
llvm-svn: 99893
2010-03-30 17:32:08 +00:00
Torok Edwin
df7c52143e
Reapply r99881 with some fixes: only call destructor in releaseMemory!
...
llvm-svn: 99883
2010-03-30 11:17:48 +00:00
Torok Edwin
0994bb75ce
Revert 99881, it brooke smooshlab's llvm-gcc-i386-darwin9.
...
llvm-svn: 99882
2010-03-30 10:25:08 +00:00
Torok Edwin
24db267b1e
Introduce another Reset() method in BumpPtrAllocator that calls a destructor
...
on all objects it has allocated, if they are all of the same size and alignment.
Use this to destruct all VNInfos allocated in LiveIntervalAnalysis (PR6653).
valnos is not reliable for this purpose, as seen in r99400
(which still leaked, and sometimes caused double frees).
llvm-svn: 99881
2010-03-30 10:08:26 +00:00
Chris Lattner
fda28ada89
stringref'ize Timer apis
...
llvm-svn: 99877
2010-03-30 05:34:02 +00:00
Chris Lattner
966ab1ec5e
finally, maintain a global list of timer groups, allowing us to
...
implement TimerGroup::printAll, which prints and resets all active
timers.
llvm-svn: 99876
2010-03-30 05:27:58 +00:00
Chris Lattner
ea827a1632
add a new TimerGroup::print method, and refactor away the bogus
...
TimerGroup copy ctor and assignment operator.
llvm-svn: 99875
2010-03-30 05:20:02 +00:00
Chris Lattner
76a4736a55
rename GetLibSupportInfoOutputFile -> CreateInfoOutputFile and
...
have it always return a new stream to simplify clients.
llvm-svn: 99874
2010-03-30 05:01:08 +00:00
Chris Lattner
3e11ba35b0
if a timergroup is destroyed before its timers, print times.
...
llvm-svn: 99873
2010-03-30 04:58:26 +00:00
Chris Lattner
2a254fd348
change TimerGroup to keep a linked list of active timers
...
instead of just a count of them, and refactor the guts of
report printing out of removeTimer into its own method.
Refactor addTimerToPrint away.
llvm-svn: 99872
2010-03-30 04:40:01 +00:00
Chris Lattner
4424043996
reapply my timer rewrite with a change for PassManager to store
...
timers by pointer instead of by-value.
llvm-svn: 99871
2010-03-30 04:03:22 +00:00
Chris Lattner
bbb637bacc
revert r99862 which is causing FNT failures.
...
llvm-svn: 99870
2010-03-30 03:57:00 +00:00
Chris Lattner
65efe21d42
fairly major rewrite of various timing related stuff.
...
llvm-svn: 99862
2010-03-30 02:38:19 +00:00
Chris Lattner
92303f03c1
move a function into a more logical place in the file
...
llvm-svn: 99842
2010-03-29 21:34:06 +00:00
Chris Lattner
7e3957a646
remove support for per-time peak memory tracking, this
...
isn't used by anyone and is better exposed as a non-per-timer
thing. Also, stop including System/Mutex.h in Timer.h
llvm-svn: 99841
2010-03-29 21:28:41 +00:00
Chris Lattner
0c8d8cd921
various timer fixes: move operator= out of line,
...
eliminate the per-timer lock (timers should be
externally locked if needed), the info-output-stream
can never be dbgs(), so drop the check. Make some
stuff private.
llvm-svn: 99839
2010-03-29 21:24:52 +00:00
Chris Lattner
8cb292db38
s/.../.
...
llvm-svn: 99834
2010-03-29 20:40:19 +00:00
Chris Lattner
54f827b072
move code around and improve indentation, no functionality change.
...
llvm-svn: 99831
2010-03-29 20:35:01 +00:00
Chris Lattner
ebe18a8f38
improve portability to minix, patch by
...
Kees van Reeuwijk for PR6704
llvm-svn: 99677
2010-03-26 23:54:15 +00:00
Dan Gohman
177e2ae058
Fix minor style issues.
...
llvm-svn: 99414
2010-03-24 19:38:02 +00:00
Duncan Sands
9c60cc1c87
Fix comment typo.
...
llvm-svn: 99392
2010-03-24 09:05:14 +00:00
Dan Gohman
8f98d70a9b
Add the ability to "intern" FoldingSetNodeID data into a
...
BumpPtrAllocator-allocated region to allow it to be stored in a more
compact form and to avoid the need for a non-trivial destructor call.
Use this new mechanism in ScalarEvolution instead of
FastFoldingSetNode to avoid leaking memory in the case where a
FoldingSetNodeID uses heap storage, and to reduce overall memory
usage.
llvm-svn: 98829
2010-03-18 16:16:38 +00:00
Douglas Gregor
84ef0ef3b9
Extend MemoryBuffer::getFile() to take an optional "stat" structure
...
pointer. If given, the structure will be set with the stat information from
the file actually read.
llvm-svn: 98575
2010-03-15 20:32:14 +00:00
Chris Lattner
a446775fd5
make APFloat::toString be const.
...
llvm-svn: 97883
2010-03-06 19:20:13 +00:00
Chris Lattner
f42f70bfa1
add an assertion requested on llvmdev.
...
llvm-svn: 97769
2010-03-05 00:49:08 +00:00
John McCall
e5b0ef9279
Don't potentially read past the end of the fill data when making a NaN from
...
an APInt.
llvm-svn: 97467
2010-03-01 18:38:45 +00:00
John McCall
f3fa6eb2ad
Properly clear all the extra bits in a significand when making a NaN from an
...
APInt. Be certain to set the integer bit in an x87 extended-precision
significand so that we don't accidentally make a pseudo-NaN.
llvm-svn: 97382
2010-02-28 12:49:50 +00:00
John McCall
b6e6dd63ad
Add an override to StringRef::getAsInteger which parses into an APInt.
...
It gets its own implementation totally divorced from the (presumably
performance-sensitive) routines which parse into a uint64_t.
Add APInt::operator|=(uint64_t), which is situationally much better than
using a full APInt.
llvm-svn: 97381
2010-02-28 09:55:58 +00:00
John McCall
69bc985550
Teach APFloat how to create both QNaNs and SNaNs and with arbitrary-width
...
payloads. APFloat's internal folding routines always make QNaNs now,
instead of sometimes making QNaNs and sometimes SNaNs depending on the
type.
llvm-svn: 97364
2010-02-28 02:51:25 +00:00
John McCall
bb9c3309b2
Make APFloat's string-parsing routines a bit safer against very large exponents.
...
llvm-svn: 97278
2010-02-26 22:20:41 +00:00
Benjamin Kramer
db1d98a624
Replace a temporary std::string with SmallString.
...
llvm-svn: 97259
2010-02-26 20:28:29 +00:00
Wesley Peck
94cdac52e5
Adding the MicroBlaze backend.
...
The MicroBlaze is a highly configurable 32-bit soft-microprocessor for
use on Xilinx FPGAs. For more information see:
http://www.xilinx.com/tools/microblaze.htm
http://en.wikipedia.org/wiki/MicroBlaze
The current LLVM MicroBlaze backend generates assembly which can be
compiled using the an appropriate binutils assembler.
llvm-svn: 96969
2010-02-23 19:15:24 +00:00
Jeffrey Yasskin
d5509ca6a2
Fix viewCFG on Linux.
...
llvm-svn: 96834
2010-02-23 00:04:53 +00:00
Dan Gohman
835086ef52
Fix various doxygen warnings.
...
llvm-svn: 96779
2010-02-22 04:10:52 +00:00
Duncan Sands
ca05b607b7
Refer to -help instead of --help since this is what tools themselves say.
...
Also, have tools output -help-hidden rather than refer to --help-hidden,
for consistency, and likewise adjust documentation. This doesn't change
every mention of --help, only those which seemed clearly safe.
llvm-svn: 96578
2010-02-18 14:08:13 +00:00
Daniel Dunbar
92e99d82a2
Add Regex::sub, for doing regular expression substitution with backreferences.
...
llvm-svn: 96503
2010-02-17 20:08:42 +00:00
Chris Lattner
bd65f192f2
enhance raw_svector_ostream::write_impl to work with unbuffered streams,
...
which may call write_impl on things that are not the usual buffer.
llvm-svn: 96209
2010-02-15 02:18:26 +00:00
Chris Lattner
eeadc240f2
make PadToColumn return the stream so you can use:
...
OS.PadToColumn(42) << "foo";
llvm-svn: 96208
2010-02-15 02:17:50 +00:00
Dan Gohman
92b6122204
Fix "the the" and similar typos.
...
llvm-svn: 95781
2010-02-10 16:03:48 +00:00
Chris Lattner
e43007d443
add support for the sparcv9-*-* target triple to turn on
...
64-bit sparc codegen. Patch by Nathan Keynes!
llvm-svn: 95293
2010-02-04 06:34:01 +00:00
John McCall
8bcabdeffc
Make APInt::countLeadingZerosSlowCase() treat the contents of padding bits
...
as undefined. Fixes an assertion in APFloat::toString noticed by Dale.
llvm-svn: 95196
2010-02-03 03:42:44 +00:00
Benjamin Kramer
fbfb029ab0
Fix MSVC build.
...
llvm-svn: 94809
2010-01-29 15:19:06 +00:00
Benjamin Kramer
cae092b08b
Convert some users of ftostr to raw_ostream.
...
llvm-svn: 94808
2010-01-29 14:42:22 +00:00
Benjamin Kramer
326bcaa5f9
Use llvm::format instead of ftostr (which just calls sprintf).
...
llvm-svn: 94807
2010-01-29 14:40:33 +00:00
Benjamin Kramer
3b01285b76
Replace strcpy with memcpy when we have the length around anyway.
...
llvm-svn: 94746
2010-01-28 18:04:38 +00:00
Mikhail Glushenkov
5d02574734
Make SMDiagnostic::Print a const method.
...
llvm-svn: 94672
2010-01-27 10:13:28 +00:00
Mikhail Glushenkov
a5a618a417
Trailing whitespace.
...
llvm-svn: 94671
2010-01-27 10:13:11 +00:00
Dan Gohman
47ec8cddb7
Fix a typo that several people pointed out. Also, address the case of
...
wrapping that Duncan pointed out.
llvm-svn: 94547
2010-01-26 15:56:18 +00:00
Dan Gohman
0c02f09fba
Add a comment about a missed opportunity.
...
llvm-svn: 94507
2010-01-26 04:13:15 +00:00
Dan Gohman
2d9a3eb391
Print empty and full sets specially.
...
llvm-svn: 94506
2010-01-26 04:12:55 +00:00
Chris Lattner
639c136993
Changes to fix buffering that I forgot to commit with previous patch.
...
llvm-svn: 94222
2010-01-22 21:16:10 +00:00
Chris Lattner
20390f5205
add a new MCAsmStreamer::GetCommentOS method to simplify stuff
...
that doesn't want to use twines.
llvm-svn: 94199
2010-01-22 19:17:48 +00:00
Dan Gohman
2d3e1be372
Avoid printing a spurious semicolon when there is no filename.
...
llvm-svn: 94071
2010-01-21 10:13:27 +00:00
David Greene
8831009b02
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
21e6f07f53
Fix refacto reported by Nicolas Geoffray.
...
llvm-svn: 93723
2010-01-18 12:40:05 +00:00
Bill Wendling
921cd93e85
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
bb1779e022
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
5db856d384
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
400ab557d3
Remove unused string functions.
...
llvm-svn: 93183
2010-01-11 20:33:12 +00:00
Benjamin Kramer
45e333ea95
Add StrInStrNoCase, a StringRef version of CStrInCStrNoCase.
...
llvm-svn: 93174
2010-01-11 19:45:18 +00:00
Benjamin Kramer
7ec2a31f14
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
cdbc36f961
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
8f97b49457
Suppress use of uninitialized variable warning.
...
llvm-svn: 93046
2010-01-09 08:30:33 +00:00
Douglas Gregor
c8114b239b
More trivial optimizations to a function well outside the critical path
...
llvm-svn: 92896
2010-01-07 02:24:06 +00:00
Douglas Gregor
b7161a0b1c
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
e06113f92c
Change errs() to dbgs().
...
llvm-svn: 92646
2010-01-05 01:29:03 +00:00
David Greene
748f4ea3c4
Change errs() to dbgs().
...
llvm-svn: 92645
2010-01-05 01:28:58 +00:00
David Greene
70b4a7ebff
Change errs() to dbgs().
...
llvm-svn: 92643
2010-01-05 01:28:52 +00:00
David Greene
d36fd269e1
Change errs() to dbgs().
...
llvm-svn: 92642
2010-01-05 01:28:47 +00:00
David Greene
a060a30a13
Change errs() to dbgs().
...
llvm-svn: 92641
2010-01-05 01:28:43 +00:00
David Greene
065337b05c
Change errs() to dbgs().
...
llvm-svn: 92640
2010-01-05 01:28:40 +00:00
David Greene
b961c4aa37
Change errs() to dbgs().
...
llvm-svn: 92638
2010-01-05 01:28:32 +00:00
David Greene
4bf2def211
Change errs() to dbgs().
...
llvm-svn: 92637
2010-01-05 01:28:29 +00:00
Douglas Gregor
c4174c69ea
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
301af636d3
Implement edit distance for StringRef
...
llvm-svn: 92309
2009-12-30 17:23:44 +00:00
Chris Lattner
86c74f4783
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
baa1820ccb
fix indentation, fit in 80 cols.
...
llvm-svn: 92267
2009-12-29 21:09:57 +00:00
Chris Lattner
20668429a2
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
75f1b8beeb
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
c6cdebbedd
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
c71c44ec7f
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
dad4e2e4e5
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
9c8c8af11d
Clarify how dbgs() operates.
...
llvm-svn: 92083
2009-12-23 23:23:15 +00:00
Chris Lattner
0f8308d48a
sizeof(char) is always 1.
...
llvm-svn: 92079
2009-12-23 23:03:24 +00:00
Douglas Gregor
37e54f9d4d
De-bork CMake build
...
llvm-svn: 92003
2009-12-23 17:03:46 +00:00
David Greene
3f7cf289ed
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
f1f78a15e1
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
e390b70e2c
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
eee37b7ba5
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
8e0956f734
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
a8dc0ca084
DeltaAlgorithm: Add a virtual destructor and home.
...
llvm-svn: 90957
2009-12-09 07:19:48 +00:00
Daniel Dunbar
ff4a35a76b
Fix typo and add missing include.
...
llvm-svn: 90557
2009-12-04 08:17:07 +00:00
Dan Gohman
c33030883f
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
63e2201f3e
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
bd9a13086f
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
2cb3662a53
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
11a4dce179
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
d561db80e6
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
8bb8ca3945
Use StringRef::min instead of std::min.
...
llvm-svn: 89372
2009-11-19 18:53:18 +00:00
Mikhail Glushenkov
55f7bd16f2
Trailing whitespace.
...
llvm-svn: 89364
2009-11-19 17:29:36 +00:00
Edward O'Callaghan
fb2393159b
Add PS3 Triple class, Credit to John Thompson.
...
llvm-svn: 89339
2009-11-19 11:59:00 +00:00
Viktor Kutuzov
1452b67541
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
f3f063a58e
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
Owen Anderson
b319694f75
Fix a race condition in the Timer class.
...
llvm-svn: 89056
2009-11-17 07:06:10 +00:00
Edward O'Callaghan
c672c34d7a
Add PSP OS Target to Triple, Credit to Bruno Cardoso Lopes.
...
llvm-svn: 88849
2009-11-15 10:18:17 +00:00
Daniel Dunbar
57f21a7c25
Report the detected host CPU in --version.
...
llvm-svn: 88813
2009-11-14 21:36:07 +00:00
Rafael Espindola
bece8d9ae7
Distinguish "a," from "a". The first one splits into "a" + "" and the second one into
...
"a" + 0.
llvm-svn: 87084
2009-11-13 04:55:09 +00:00
Rafael Espindola
11ceba8119
Switch to smallvector. Also fix issue with using unsigend for MaxSplit.
...
llvm-svn: 87068
2009-11-13 02:18:25 +00:00
Rafael Espindola
22f040b797
Add a new split method to StringRef that puts the substrings in a vector.
...
llvm-svn: 87058
2009-11-13 01:24:40 +00:00
Benjamin Kramer
da70783da7
Add compare_lower and equals_lower methods to StringRef. Switch all users of
...
StringsEqualNoCase (from StringExtras.h) to it.
llvm-svn: 87020
2009-11-12 20:36:59 +00:00
Nuno Lopes
569944e45f
fix crash in my previous patch
...
llvm-svn: 86987
2009-11-12 15:10:33 +00:00
Nuno Lopes
aa4a883855
implement shl, ashr, and lshr methods. shl is not fully implemented as it is quite tricky.
...
llvm-svn: 86986
2009-11-12 14:53:53 +00:00
Sandeep Patel
a167903217
Show command-line args and features passed into backend in debug output. Approved by Evan Cheng.
...
llvm-svn: 86797
2009-11-11 03:23:46 +00:00
Daniel Dunbar
16a5387db2
Add From arguments to StringRef search functions, and tweak doxyments.
...
Also, add unittests for find_first_of and find_first_not_of.
llvm-svn: 86770
2009-11-11 00:28:53 +00:00
Daniel Dunbar
886e51b5c1
Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a lame API.
...
Also, Stringrefify some more MemoryBuffer functions, and add two performance FIXMEs.
llvm-svn: 86630
2009-11-10 00:43:58 +00:00
Nuno Lopes
5b15b50af4
add zextOrTrunc and sextOrTrunc methods, that are similar to the ones in APInt
...
llvm-svn: 86549
2009-11-09 15:36:28 +00:00
Xerxes Ranby
57e81f28c1
Make lib/Support/Debug.cpp SetCurrentDebugType implementation part of llvm namespace to match function declaration in Debug.h.
...
llvm-svn: 86544
2009-11-09 14:50:34 +00:00
Mikhail Glushenkov
9c1ea77f8c
Trailing whitespace.
...
llvm-svn: 86347
2009-11-07 06:33:12 +00:00
Daniel Dunbar
4daaf9d3f4
Pass StringRef by value.
...
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
Duncan Sands
7d20275318
A value is only assigned to errno if NumRead equals -1, so do
...
not reason based on errno if NumRead has a different value.
llvm-svn: 86046
2009-11-04 20:50:23 +00:00