1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00

give StringRef a const_iterator member.

llvm-svn: 93294
This commit is contained in:
Chris Lattner 2010-01-13 04:50:20 +00:00
parent e8e56916d1
commit a8deef7d39

View File

@ -29,6 +29,7 @@ namespace llvm {
class StringRef {
public:
typedef const char *iterator;
typedef const char *const_iterator;
static const size_t npos = ~size_t(0);
typedef size_t size_type;
@ -42,15 +43,8 @@ namespace llvm {
// Workaround PR5482: nearly all gcc 4.x miscompile StringRef and std::min()
// Changing the arg of min to be an integer, instead of a reference to an
// integer works around this bug.
size_t min(size_t a, size_t b) const
{
return a < b ? a : b;
}
size_t max(size_t a, size_t b) const
{
return a > b ? a : b;
}
size_t min(size_t a, size_t b) const { return a < b ? a : b; }
size_t max(size_t a, size_t b) const { return a > b ? a : b; }
public:
/// @name Constructors