teemperor marked an inline comment as done. teemperor added inline comments.
================ Comment at: source/Core/Highlighter.cpp:34 + // Calculate how many bytes we have written. + return m_prefix.size() + value.size() + m_suffix.size(); +} ---------------- labath wrote: > teemperor wrote: > > labath wrote: > > > This isn't correct, as you're not writing m_prefix, but it's > > > transmogrified version. Btw, do you really need this return value anyway? > > Good catch. And the return value is just to make the SourceManager happy > > which always returns the total amount of bytes written. I'm working on a > > patch that will move all the 'written byte counting' in lldb into the > > Stream class, but as of now that's how it works. > That sounds like a good idea. When you do that, could you please refer to the > llvm raw_ostream classes to see how they handle this. Long term, it would be > great if we could replace lldb's classes with those, so I'd like to avoid > diverging from them if possible. raw_ostream has the same functionality with `tell()`, so that is actually in line with the idea of moving to LLVM's stream classes. https://reviews.llvm.org/D49334 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits