Commit Graph

1307 Commits

Author SHA1 Message Date
Chris Lattner
67eadb397a improve portability to minix, patch by
Kees van Reeuwijk for PR6704


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99677 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 23:54:15 +00:00
Dan Gohman
16e02097d2 Fix minor style issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99414 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 19:38:02 +00:00
Duncan Sands
bbdca3f68e Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99392 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 09:05:14 +00:00
Dan Gohman
c93b4cff89 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98829 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 16:16:38 +00:00
Douglas Gregor
1bb30b6f75 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98575 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 20:32:14 +00:00
Chris Lattner
0ddda3b8c6 make APFloat::toString be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97883 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06 19:20:13 +00:00
Chris Lattner
f071d4efeb add an assertion requested on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97769 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 00:49:08 +00:00
John McCall
d44c6cc477 Don't potentially read past the end of the fill data when making a NaN from
an APInt.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97467 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 18:38:45 +00:00
John McCall
165e96bd25 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97382 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-28 12:49:50 +00:00
John McCall
1e7ad3993d 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97381 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-28 09:55:58 +00:00
John McCall
e12b73816b 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-28 02:51:25 +00:00
John McCall
8b3f3307a2 Make APFloat's string-parsing routines a bit safer against very large exponents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 22:20:41 +00:00
Benjamin Kramer
aabc26c4d5 Replace a temporary std::string with SmallString.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 20:28:29 +00:00
Wesley Peck
a70f28ce7d 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96969 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 19:15:24 +00:00
Jeffrey Yasskin
e298d7cc58 Fix viewCFG on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96834 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 00:04:53 +00:00
Dan Gohman
fb76fe0929 Fix various doxygen warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96779 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-22 04:10:52 +00:00
Duncan Sands
7e7ae5ad69 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96578 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 14:08:13 +00:00
Daniel Dunbar
d2a5c0d856 Add Regex::sub, for doing regular expression substitution with backreferences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17 20:08:42 +00:00
Chris Lattner
17f26b4fd2 enhance raw_svector_ostream::write_impl to work with unbuffered streams,
which may call write_impl on things that are not the usual buffer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96209 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 02:18:26 +00:00
Chris Lattner
efbdaa6463 make PadToColumn return the stream so you can use:
OS.PadToColumn(42) << "foo";



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96208 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 02:17:50 +00:00
Dan Gohman
f451cb870e Fix "the the" and similar typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 16:03:48 +00:00
Chris Lattner
87c06d6179 add support for the sparcv9-*-* target triple to turn on
64-bit sparc codegen.  Patch by Nathan Keynes!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-04 06:34:01 +00:00
John McCall
281d051921 Make APInt::countLeadingZerosSlowCase() treat the contents of padding bits
as undefined.  Fixes an assertion in APFloat::toString noticed by Dale.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95196 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 03:42:44 +00:00
Benjamin Kramer
4f17eb8721 Fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 15:19:06 +00:00
Benjamin Kramer
5908839ced Convert some users of ftostr to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94808 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 14:42:22 +00:00
Benjamin Kramer
f304ff63d3 Use llvm::format instead of ftostr (which just calls sprintf).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94807 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 14:40:33 +00:00
Benjamin Kramer
12ea66a727 Replace strcpy with memcpy when we have the length around anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94746 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 18:04:38 +00:00
Mikhail Glushenkov
42210668da Make SMDiagnostic::Print a const method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94672 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 10:13:28 +00:00
Mikhail Glushenkov
e690ffbe6d Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 10:13:11 +00:00
Dan Gohman
8dcc58e6b4 Fix a typo that several people pointed out. Also, address the case of
wrapping that Duncan pointed out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94547 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 15:56:18 +00:00
Dan Gohman
153f1ebeb8 Add a comment about a missed opportunity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94507 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:13:15 +00:00
Dan Gohman
df6d5e0394 Print empty and full sets specially.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94506 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:12:55 +00:00
Chris Lattner
14ca177beb Changes to fix buffering that I forgot to commit with previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94222 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 21:16:10 +00:00
Chris Lattner
d79d9dce47 add a new MCAsmStreamer::GetCommentOS method to simplify stuff
that doesn't want to use twines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94199 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 19:17:48 +00:00
Dan Gohman
5e5442c98b Avoid printing a spurious semicolon when there is no filename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94071 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 10:13:27 +00:00
David Greene
2ef951e6ee Fix an infinite recursion problem. dbgs() should return errs() in
release mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94001 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 15:27:19 +00:00
Benjamin Kramer
4e7e2f5a36 Fix refacto reported by Nicolas Geoffray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93723 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 12:40:05 +00:00
Bill Wendling
c5b7b19677 Temporarily revert r93581. It was causing failures in the ExecutionEngine tests
on the build bots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 01:06:58 +00:00
Ted Kremenek
67c59826bf BumpPtrAllocator: Have the DefaultSlabAllocator created at runtime, not 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
2010-01-15 23:29:34 +00:00
Benjamin Kramer
b357e06f67 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93317 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 12:45:23 +00:00
Benjamin Kramer
7dd6107fcc Remove unused string functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 20:33:12 +00:00
Benjamin Kramer
7462b5dd99 Add StrInStrNoCase, a StringRef version of CStrInCStrNoCase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 19:45:18 +00:00
Benjamin Kramer
c30837d6c1 Turns out llvm-gcc still uses SplitString with a vector. Add it back until I
have a fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 18:44:35 +00:00
Benjamin Kramer
d4f195999a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 18:03:24 +00:00
Duncan Sands
1fa8b00b30 Suppress use of uninitialized variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93046 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 08:30:33 +00:00
Douglas Gregor
2772ea831c More trivial optimizations to a function well outside the critical path
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92896 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 02:24:06 +00:00
Douglas Gregor
ad6b6da8aa 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 00:51:54 +00:00
David Greene
fcb5b831f6 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:03 +00:00
David Greene
da80ff6ae6 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:58 +00:00
David Greene
465abed388 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92643 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:52 +00:00
David Greene
8061a440f6 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:47 +00:00
David Greene
8f1929b9ea Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:43 +00:00
David Greene
2b965b05fc Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:40 +00:00
David Greene
7fd5fb4b47 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:32 +00:00
David Greene
af6c8cc272 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:29 +00:00
Douglas Gregor
7e54d5b156 Document the edit-distance algorithm used in StringRef, switch it over
to SmallVector, and add a unit test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92340 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-31 04:24:34 +00:00
Douglas Gregor
441c8b4ad1 Implement edit distance for StringRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92309 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-30 17:23:44 +00:00
Chris Lattner
837eda93ee Do not crash when .ll printing metadata that smells like debug info, but isn't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92268 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-29 21:17:33 +00:00
Chris Lattner
480decf1a2 fix indentation, fit in 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92267 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-29 21:09:57 +00:00
Chris Lattner
7f29dfd75c fix .cpp file to not wrap the entire file in namespace blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92250 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-29 07:28:33 +00:00
John McCall
6a09affdf6 Implement support for converting to string at "natural precision", and fix some
major bugs in long-precision conversion.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24 23:18:09 +00:00
John McCall
003a09c68d 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24 12:16:56 +00:00
John McCall
00e65de9d8 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24 08:56:26 +00:00
John McCall
d73bf5987a Set Remainder before Quotient in case Quotient and LHS alias. The new
order should be immune to such problems.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92124 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24 08:52:06 +00:00
David Greene
037764227e Clarify how dbgs() operates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 23:23:15 +00:00
Chris Lattner
62dc896bc4 sizeof(char) is always 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 23:03:24 +00:00
Douglas Gregor
734d236aaf De-bork CMake build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 17:03:46 +00:00
David Greene
b5d568cc70 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 16:39:06 +00:00
David Greene
e59011e7d9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92001 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 16:08:15 +00:00
Chris Lattner
cd0129f5a6 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-19 01:38:42 +00:00
Chris Lattner
b3649db102 now that libsystem no longer uses SmallVector, we can move
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
2009-12-16 08:44:24 +00:00
Dan Gohman
a4f8ecd85d Micro-optimize these functions in the case where they are not inlined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91316 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-14 19:32:31 +00:00
Daniel Dunbar
022840e960 DeltaAlgorithm: Add a virtual destructor and home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 07:19:48 +00:00
Daniel Dunbar
83563b24ce Fix typo and add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90557 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 08:17:07 +00:00
Dan Gohman
018402d30c Print a newline after the Args: line so that unrelated errs() output doesn't
end up on the same line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90473 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 19:03:18 +00:00
Daniel Dunbar
a6d5e40e25 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90447 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 11:12:42 +00:00
Chris Lattner
6e1f16d522 return more useful error messages by using strerror to format errno
instead of returning an ambiguous reason.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 22:51:41 +00:00
Douglas Gregor
b3587cfb3b Perform explicit instantiations in the proper namespace, since Clang diagnoses this ill-formity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 06:04:18 +00:00
Daniel Dunbar
4153982375 SourceMgr: Add ShowLine argument to PrintMessage, to allow suppressing the source line output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89627 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22 22:08:00 +00:00
Mikhail Glushenkov
37628e0098 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89463 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 17:23:17 +00:00
Daniel Dunbar
58ce7acb4f Use StringRef::min instead of std::min.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89372 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 18:53:18 +00:00
Mikhail Glushenkov
eeebecfcb4 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89364 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 17:29:36 +00:00
Edward O'Callaghan
cc9fa81fe1 Add PS3 Triple class, Credit to John Thompson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89339 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 11:59:00 +00:00
Viktor Kutuzov
51cdac02c4 Added getArchNameForAssembler method to the Triple class for which returns OS and Vendor independent target assembler arch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 18:48:27 +00:00
Benjamin Kramer
110e7bb25c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 17:57:04 +00:00
Owen Anderson
252e574924 Fix a race condition in the Timer class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 07:06:10 +00:00
Edward O'Callaghan
e0fb75d586 Add PSP OS Target to Triple, Credit to Bruno Cardoso Lopes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88849 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-15 10:18:17 +00:00
Daniel Dunbar
ba43e0785b Report the detected host CPU in --version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 21:36:07 +00:00
Rafael Espindola
20fd4ec8c5 Distinguish "a," from "a". The first one splits into "a" + "" and the second one into
"a" + 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 04:55:09 +00:00
Rafael Espindola
c78c0c99a0 Switch to smallvector. Also fix issue with using unsigend for MaxSplit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87068 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 02:18:25 +00:00
Rafael Espindola
5ccac24726 Add a new split method to StringRef that puts the substrings in a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 01:24:40 +00:00
Benjamin Kramer
05872ea804 Add compare_lower and equals_lower methods to StringRef. Switch all users of
StringsEqualNoCase (from StringExtras.h) to it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 20:36:59 +00:00
Nuno Lopes
4459145c2c fix crash in my previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 15:10:33 +00:00
Nuno Lopes
34e992da38 implement shl, ashr, and lshr methods. shl is not fully implemented as it is quite tricky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 14:53:53 +00:00
Sandeep Patel
bf177ee6fd Show command-line args and features passed into backend in debug output. Approved by Evan Cheng.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86797 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 03:23:46 +00:00
Daniel Dunbar
64066bd8b5 Add From arguments to StringRef search functions, and tweak doxyments.
Also, add unittests for find_first_of and find_first_not_of.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86770 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 00:28:53 +00:00
Daniel Dunbar
d65267ee62 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86630 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10 00:43:58 +00:00
Nuno Lopes
95a3be0ba4 add zextOrTrunc and sextOrTrunc methods, that are similar to the ones in APInt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86549 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 15:36:28 +00:00
Xerxes Ranby
5aa638d8f7 Make lib/Support/Debug.cpp SetCurrentDebugType implementation part of llvm namespace to match function declaration in Debug.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86544 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 14:50:34 +00:00
Mikhail Glushenkov
c11e84d3e7 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 06:33:12 +00:00