summaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/StringExtras.h
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-04-14 13:54:10 +0000
committerdim <dim@FreeBSD.org>2012-04-14 13:54:10 +0000
commit1fc08f5e9ef733ef1ce6f363fecedc2260e78974 (patch)
tree19c69a04768629f2d440944b71cbe90adae0b615 /include/llvm/ADT/StringExtras.h
parent07637c87f826cdf411f0673595e9bc92ebd793f2 (diff)
downloadFreeBSD-src-1fc08f5e9ef733ef1ce6f363fecedc2260e78974.zip
FreeBSD-src-1fc08f5e9ef733ef1ce6f363fecedc2260e78974.tar.gz
Vendor import of llvm trunk r154661:
http://llvm.org/svn/llvm-project/llvm/trunk@r154661
Diffstat (limited to 'include/llvm/ADT/StringExtras.h')
-rw-r--r--include/llvm/ADT/StringExtras.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h
index d01d3e1..655d884 100644
--- a/include/llvm/ADT/StringExtras.h
+++ b/include/llvm/ADT/StringExtras.h
@@ -15,12 +15,7 @@
#define LLVM_ADT_STRINGEXTRAS_H
#include "llvm/Support/DataTypes.h"
-#include "llvm/ADT/APFloat.h"
-#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/StringRef.h"
-#include <cctype>
-#include <cstdio>
-#include <string>
namespace llvm {
template<typename T> class SmallVectorImpl;
@@ -101,38 +96,6 @@ static inline std::string itostr(int64_t X) {
return utostr(static_cast<uint64_t>(X));
}
-static inline std::string ftostr(double V) {
- char Buffer[200];
- sprintf(Buffer, "%20.6e", V);
- char *B = Buffer;
- while (*B == ' ') ++B;
- return B;
-}
-
-static inline std::string ftostr(const APFloat& V) {
- if (&V.getSemantics() == &APFloat::IEEEdouble)
- return ftostr(V.convertToDouble());
- else if (&V.getSemantics() == &APFloat::IEEEsingle)
- return ftostr((double)V.convertToFloat());
- return "<unknown format in ftostr>"; // error
-}
-
-static inline std::string LowercaseString(const std::string &S) {
- std::string result(S);
- for (unsigned i = 0; i < S.length(); ++i)
- if (isupper(result[i]))
- result[i] = char(tolower(result[i]));
- return result;
-}
-
-static inline std::string UppercaseString(const std::string &S) {
- std::string result(S);
- for (unsigned i = 0; i < S.length(); ++i)
- if (islower(result[i]))
- result[i] = char(toupper(result[i]));
- return result;
-}
-
/// StrInStrNoCase - Portable version of strcasestr. Locates the first
/// occurrence of string 's1' in string 's2', ignoring case. Returns
/// the offset of s2 in s1 or npos if s2 cannot be found.
OpenPOWER on IntegriCloud