summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Encoding.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/Encoding.h')
-rw-r--r--clang/lib/Format/Encoding.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/clang/lib/Format/Encoding.h b/clang/lib/Format/Encoding.h
index b2103cb412e..3339597b4ed 100644
--- a/clang/lib/Format/Encoding.h
+++ b/clang/lib/Format/Encoding.h
@@ -40,26 +40,6 @@ inline Encoding detectEncoding(StringRef Text) {
return Encoding_Unknown;
}
-inline unsigned getCodePointCountUTF8(StringRef Text) {
- unsigned CodePoints = 0;
- for (size_t i = 0, e = Text.size(); i < e;
- i += llvm::getNumBytesForUTF8(Text[i])) {
- ++CodePoints;
- }
- return CodePoints;
-}
-
-/// \brief Gets the number of code points in the Text using the specified
-/// Encoding.
-inline unsigned getCodePointCount(StringRef Text, Encoding Encoding) {
- switch (Encoding) {
- case Encoding_UTF8:
- return getCodePointCountUTF8(Text);
- default:
- return Text.size();
- }
-}
-
/// \brief Returns the number of columns required to display the \p Text on a
/// generic Unicode-capable terminal. Text is assumed to use the specified
/// \p Encoding.
OpenPOWER on IntegriCloud