diff options
Diffstat (limited to 'lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp')
-rw-r--r-- | lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp b/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp index 29da03d71dd..442d4cf53e3 100644 --- a/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp +++ b/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp @@ -128,14 +128,12 @@ determineClangStyle(const ClangHighlighter &highlighter, return HighlightStyle::ColorStyle(); } -std::size_t ClangHighlighter::Highlight(const HighlightStyle &options, - llvm::StringRef line, - llvm::StringRef previous_lines, - Stream &result) const { +void ClangHighlighter::Highlight(const HighlightStyle &options, + llvm::StringRef line, + llvm::StringRef previous_lines, + Stream &result) const { using namespace clang; - std::size_t written_bytes = 0; - FileSystemOptions file_opts; FileManager file_mgr(file_opts); @@ -210,7 +208,7 @@ std::size_t ClangHighlighter::Highlight(const HighlightStyle &options, HighlightStyle::ColorStyle color = determineClangStyle(*this, token, tok_str, options, in_pp_directive); - written_bytes += color.Apply(result, tok_str); + color.Apply(result, tok_str); } // If we went over the whole file but couldn't find our own file, then @@ -219,9 +217,6 @@ std::size_t ClangHighlighter::Highlight(const HighlightStyle &options, // debug mode we bail out with an assert as this should never happen. if (!found_user_line) { result << line; - written_bytes += line.size(); assert(false && "We couldn't find the user line in the input file?"); } - - return written_bytes; } |