[Lldb-commits] [PATCH] D49334: [LLDB} Added syntax highlighting support
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 25 11:55:52 PDT 2018
teemperor updated this revision to Diff 157320.
teemperor marked 8 inline comments as done.
teemperor added a comment.
- Addressed Pavel's comments. Also cleaned up some more includes.
Yes, knowing the language we currently display would be nice, but I didn't see a good way to reliably get this information. The File class doesn't know anything about the meaning of its contents. And the SourceManager can be given a SymbolContextList, but looking at the test coverage that list is often just a nullptr.
So I went with the file name matching as it doesn't have any surprising side effects (like starting to demangle symbols) or any special requirements to the caller (like already knowing the language type/symbol context of what we will display).
I think it's a reasonable fallback that should always work and we can later add functionality to pass a language to the SourceManager/File/etc., if the caller has that information available.
(Also thanks for the review).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 47160 bytes
Desc: not available
More information about the lldb-commits