1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
Commit Graph

58 Commits

Author SHA1 Message Date
David Majnemer
722301be0e ADT: Surface LowerCase argument for utohexstr
The underlying function. utohex_buffer, already supports an argument for
deciding if the hex characters should be upper or lower case.  Expose an
identical argument for utohexstr.

llvm-svn: 212991
2014-07-14 21:56:54 +00:00
Matt Arsenault
d6c8f3df9a Fix uint -> size_t conversion warning.
This warning is disabled for the LLVM build,
but external users of the header can still
run into this.

Patch by Ke Bai

llvm-svn: 206629
2014-04-18 18:08:31 +00:00
Alp Toker
06df538b11 Move true/false StringRef helper to StringExtras
StringRef is a low-level data wrapper that shouldn't know about language
strings like 'true' and 'false' whereas StringExtras is just the place for
higher-level utilities.

llvm-svn: 200188
2014-01-27 04:07:36 +00:00
Chandler Carruth
87f14b4eec Re-sort all of the includes with ./utils/sort_includes.py so that
subsequent changes are easier to review. About to fix some layering
issues, and wanted to separate out the necessary churn.

Also comment and sink the include of "Windows.h" in three .inc files to
match the usage in Memory.inc.

llvm-svn: 198685
2014-01-07 11:48:04 +00:00
Joerg Sonnenberger
d6a76ffd81 Add a Python-like join function to merge a list of strings with a
separator between each two elements.

llvm-svn: 189846
2013-09-03 20:43:54 +00:00
Jordan Rose
4de2cdf763 Add llvm::hexDigitValue to convert single characters to hex.
This is duplicated in a couple places in the codebase. Adopt this in APFloat.

llvm-svn: 172851
2013-01-18 21:45:30 +00:00
Chandler Carruth
ca305491f6 Sort the #include lines for the include/... tree with the script.
AKA: Recompile *ALL* the source code!

This one went much better. No manual edits here. I spot-checked for
silliness and grep-checked for really broken edits and everything seemed
good. It all still compiles. Yell if you see something that looks goofy.

llvm-svn: 169133
2012-12-03 17:02:12 +00:00
Jordan Rose
322d2a4afc Add llvm::getOrdinalSuffix to get the appropriate -st, -nd, -rd, -th suffix.
Used by clang to print parameter indexes.

llvm-svn: 164440
2012-09-22 01:24:21 +00:00
Dmitri Gribenko
aee81e7cae Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph).

llvm-svn: 163790
2012-09-13 12:34:29 +00:00
Will Dietz
8dd05d2536 Fix HashString's Bernstein hash to use unsigned chars, as is usually done.
Changes the hash result for strings containing characters
with values >= 128, such as UTF8 strings (not normal ASCII).

Changed mostly so we match other implementations.

llvm-svn: 162882
2012-08-30 00:30:21 +00:00
Benjamin Kramer
01e4003c0f Move ftostr into its last user (cppbackend) and simplify it a bit.
New code should use raw_ostream.

llvm-svn: 153326
2012-03-23 11:26:29 +00:00
Benjamin Kramer
c597902ecc Replace (Lower|Upper)caseString in favor of StringRef's newest methods.
llvm-svn: 143891
2011-11-06 20:37:06 +00:00
David Greene
5927323d9c Add a std::string Wrapper for TableGen
Create a std::string wrapper for use as a DenseMap key.  DenseMap is
not safe in generate with strings, so this wrapper indicates that only
strings guaranteed not to have certain values should be used in the
DenseMap.

llvm-svn: 136481
2011-07-29 19:06:58 +00:00
Jay Foad
c146569beb Remove unused STL header includes.
llvm-svn: 130068
2011-04-23 19:53:52 +00:00
Chris Lattner
0304b82f80 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Daniel Dunbar
05a18ee325 Add an optional LowerCase argument to hexdigit().
llvm-svn: 120213
2010-11-27 13:19:46 +00:00
Benjamin Kramer
adc8df5270 utostr isn't going away too soon, try to make it slightly smaller.
llvm-svn: 100977
2010-04-11 19:00:03 +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
Chandler Carruth
766362c707 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Daniel Dunbar
b67b5bb0b1 Move UnescapeString to a static function for its sole client; its inefficient and broken.
llvm-svn: 84358
2009-10-17 20:43:42 +00:00
Daniel Dunbar
d537c7d394 Remove llvm::EscapeString, raw_ostream::write_escaped is much faster.
llvm-svn: 84357
2009-10-17 20:43:29 +00:00
Daniel Dunbar
0107265e33 Move StringMap's string has function into StringExtras.h
llvm-svn: 84344
2009-10-17 18:21:06 +00:00
Daniel Dunbar
3db25114f0 Remove itohexstr, which only had one user.
llvm-svn: 77613
2009-07-30 18:18:54 +00:00
Ted Kremenek
17e17c7b44 Add version of StringsEqualNoCase that takes two null-terminated C-strings and compares up to 'len' characters. I tend to screw up string comparison functions, so anyone who is interested please review this\!
llvm-svn: 65236
2009-02-21 18:25:30 +00:00
Misha Brukman
da77da48f3 Removed trailing whitespace.
llvm-svn: 62000
2009-01-09 19:25:42 +00:00
Duncan Sands
dda3cac043 Work around PR1000.
llvm-svn: 58984
2008-11-10 10:05:09 +00:00
Chris Lattner
46166d50a8 split out the functionality of utohexstr into a new utohex_buffer
helper.  This allows us to convert numbers to hex without necessarily
needing to make a std::string to hold the result.

llvm-svn: 58961
2008-11-10 04:22:46 +00:00
Ted Kremenek
fb81568ed6 Fix incorrect testing for the end of the both strings in CStrInCStrNoCase. This could cause a read-out-of-bounds error if s2 is smaller than s1.
llvm-svn: 58009
2008-10-22 23:16:52 +00:00
Daniel Dunbar
2f3ec96450 Add llvm::hexdigit to StringExtras (number -> hexadecimal char)
llvm-svn: 57536
2008-10-14 23:26:20 +00:00
Ted Kremenek
1534cce257 Make the interface of CStrInCStrNoCase be the same as strcasestr.
llvm-svn: 50828
2008-05-07 20:04:18 +00:00
Ted Kremenek
b82fe559d6 Fix some serious logical errors in CStrInCStrNoCase pointed out by Bill.
llvm-svn: 50826
2008-05-07 19:22:36 +00:00
Ted Kremenek
cbaf12a084 Guard for empty strings in CStrInCStrNoCase.
llvm-svn: 50823
2008-05-07 18:49:31 +00:00
Ted Kremenek
535ed35152 Added CStrInCStrNoCase, a portable implementation of strcasestr.
llvm-svn: 50821
2008-05-07 18:35:46 +00:00
Evan Cheng
d9353009b7 Fix more -Wshorten-64-to-32 warnings.
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Scott Michel
3ad0263173 Make tblgen a little smarter about constants smaller than i32. Currently,
tblgen will complain if a sign-extended constant does not fit into a
data type smaller than i32, e.g., i16. This causes a problem when certain
hex constants are used, such as 0xff for byte masks or immediate xor
values.

tblgen will try the sign-extended value first and, if the sign extended
value would overflow, it tries to see if the unsigned value will fit.
Consequently, a software developer can now safely incant:

	(XORHIr16 R16C:$rA, 0xffff)

which is somewhat clearer and more informative than incanting:

	(XORHIr16 R16C:$rA, (i16 -1))

even if the two are bitwise equivalent.

Tblgen also outputs the 64-bit unsigned constant in the generated ISel code
when getTargetConstant() is invoked.

llvm-svn: 47188
2008-02-15 23:05:48 +00:00
Chris Lattner
55c50079c3 don't form an std::string with a null pointer, it aborts.
llvm-svn: 46166
2008-01-18 18:54:31 +00:00
Chris Lattner
e0b1ee937a Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Christopher Lamb
b9c6101dd5 Add an uppercase conversion utility function.
llvm-svn: 43146
2007-10-18 19:31:38 +00:00
Dale Johannesen
1f864b259a fix reversal bug in preceding checkin
llvm-svn: 41705
2007-09-04 17:32:27 +00:00
Dale Johannesen
a79f7d4068 Revise per review of previous patch.
llvm-svn: 41645
2007-08-31 17:03:33 +00:00
Dale Johannesen
81d6ecb886 Enhance APFloat to retain bits of NaNs (fixes oggenc).
Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.

llvm-svn: 41632
2007-08-31 04:03:46 +00:00
Chris Lattner
339c732e0b Add a helper function
llvm-svn: 31981
2006-11-28 22:32:35 +00:00
Chris Lattner
6548505f71 Add two helper functions
llvm-svn: 29150
2006-07-14 22:54:06 +00:00
Reid Spencer
bbc22e1a8a Favor C++ casts over C casts in C++ code.
llvm-svn: 28622
2006-06-01 07:03:53 +00:00
Chris Lattner
2429ec5fdf Fix utostr once and for all, by making there only be one function named
utostr.  To keep the efficiency in the 32-bit case, make it check to see if
the value is 32-bits and if so switch over to the faster 32-bit case.

llvm-svn: 28601
2006-05-31 21:25:50 +00:00
Andrew Lenharth
ed197672a8 Fix build breakage on alpha, without causing it on x86. as a bonus, all platforms can invent the same number of unique names now
llvm-svn: 28596
2006-05-31 20:18:28 +00:00