Author: d0k Date: Mon Dec 19 15:10:50 2016 New Revision: 290135 URL: http://llvm.org/viewvc/llvm-project?rev=290135&view=rev Log: [Format] Remove dead code.
No functionality change. Modified: cfe/trunk/lib/Format/Encoding.h cfe/trunk/lib/Format/TokenAnalyzer.h cfe/trunk/lib/Format/WhitespaceManager.cpp cfe/trunk/lib/Format/WhitespaceManager.h Modified: cfe/trunk/lib/Format/Encoding.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Encoding.h?rev=290135&r1=290134&r2=290135&view=diff ============================================================================== --- cfe/trunk/lib/Format/Encoding.h (original) +++ cfe/trunk/lib/Format/Encoding.h Mon Dec 19 15:10:50 2016 @@ -40,26 +40,6 @@ inline Encoding detectEncoding(StringRef 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. Modified: cfe/trunk/lib/Format/TokenAnalyzer.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/TokenAnalyzer.h?rev=290135&r1=290134&r2=290135&view=diff ============================================================================== --- cfe/trunk/lib/Format/TokenAnalyzer.h (original) +++ cfe/trunk/lib/Format/TokenAnalyzer.h Mon Dec 19 15:10:50 2016 @@ -55,15 +55,12 @@ public: FileID getFileID() const { return ID; } - StringRef getFileName() const { return FileName; } - ArrayRef<CharSourceRange> getCharRanges() const { return CharRanges; } const SourceManager &getSourceManager() const { return SM; } private: FileID ID; - StringRef FileName; SmallVector<CharSourceRange, 8> CharRanges; SourceManager &SM; Modified: cfe/trunk/lib/Format/WhitespaceManager.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/WhitespaceManager.cpp?rev=290135&r1=290134&r2=290135&view=diff ============================================================================== --- cfe/trunk/lib/Format/WhitespaceManager.cpp (original) +++ cfe/trunk/lib/Format/WhitespaceManager.cpp Mon Dec 19 15:10:50 2016 @@ -42,11 +42,6 @@ WhitespaceManager::Change::Change( TokenLength(0), PreviousEndOfTokenColumn(0), EscapedNewlineColumn(0), StartOfBlockComment(nullptr), IndentationOffset(0) {} -void WhitespaceManager::reset() { - Changes.clear(); - Replaces.clear(); -} - void WhitespaceManager::replaceWhitespace(FormatToken &Tok, unsigned Newlines, unsigned IndentLevel, unsigned Spaces, unsigned StartOfTokenColumn, Modified: cfe/trunk/lib/Format/WhitespaceManager.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/WhitespaceManager.h?rev=290135&r1=290134&r2=290135&view=diff ============================================================================== --- cfe/trunk/lib/Format/WhitespaceManager.h (original) +++ cfe/trunk/lib/Format/WhitespaceManager.h Mon Dec 19 15:10:50 2016 @@ -41,9 +41,6 @@ public: bool UseCRLF) : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {} - /// \brief Prepares the \c WhitespaceManager for another run. - void reset(); - /// \brief Replaces the whitespace in front of \p Tok. Only call once for /// each \c AnnotatedToken. void replaceWhitespace(FormatToken &Tok, unsigned Newlines, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits