Remove manual byte counting from Highlighter code.
authorRaphael Isemann <teemperor@gmail.com>
Tue, 14 Aug 2018 17:12:54 +0000 (17:12 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Tue, 14 Aug 2018 17:12:54 +0000 (17:12 +0000)
commit2d437f6b026c4f8ccb6e1daac412dd788e76b25a
tree5f4767bffbfaa0c8f26615160b88807f8a214327
parent148c44547567bc2410e8adf3d31e7eefa62f7051
Remove manual byte counting from Highlighter code.

Summary:
This removes the manual byte counting mechanism from the syntax highlighting
code. This is no longer necessary as the Stream class now has built-in support for
automatically counting the bytes that were written to it so far.

The advantage of automatic byte counting via Stream is that it is less error-prone
than the manual version and we need to write less boilerplate code.

Reviewers: labath

Reviewed By: labath

Subscribers: labath, lldb-commits

Differential Revision: https://reviews.llvm.org/D50676

llvm-svn: 339695
lldb/include/lldb/Core/Highlighter.h
lldb/source/Core/Highlighter.cpp
lldb/source/Core/SourceManager.cpp
lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp
lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.h