diff options
-rw-r--r-- | include/llvm/ADT/StringExtras.h | 5 | ||||
-rw-r--r-- | include/llvm/ADT/StringRef.h | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index dccf3e809d..a0b3fe7a06 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -28,6 +28,11 @@ static inline char hexdigit(unsigned X, bool LowerCase = false) { return X < 10 ? '0' + X : HexChar + X - 10; } +/// Construct a string ref from a boolean. +static inline StringRef toStringRef(bool B) { + return StringRef(B ? "true" : "false"); +} + /// Interpret the given character \p C as a hexadecimal digit and return its /// value. /// diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h index a35dfbfeba..4491dc3ae1 100644 --- a/include/llvm/ADT/StringRef.h +++ b/include/llvm/ADT/StringRef.h @@ -561,11 +561,6 @@ namespace llvm { // StringRefs can be treated like a POD type. template <typename T> struct isPodLike; template <> struct isPodLike<StringRef> { static const bool value = true; }; - - /// Construct a string ref from a boolean. - inline StringRef toStringRef(bool B) { - return StringRef(B ? "true" : "false"); - } } #endif |