[Lldb-commits] [lldb] [lldb] Pass the frame's language type to the highlighter (PR #181094)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 12 05:30:11 PST 2026
================
@@ -706,7 +708,8 @@ size_t SourceManager::File::DisplaySourceLines(uint32_t line,
GetSupportFile()->GetSpecOnly().GetPath(/*denormalize*/ false);
// FIXME: Find a way to get the definitive language this file was written in
// and pass it to the highlighter.
- const auto &h = mgr.getHighlighterFor(lldb::eLanguageTypeUnknown, path);
+ const auto &h = mgr.getHighlighterFor(
+ language_type.value_or(lldb::eLanguageTypeUnknown), path);
----------------
Michael137 wrote:
If we're going to use `value_or(lldb::eLanguageTypeUnknown)`, do we need to be passing it as an optional? Or can we just default it to `lldb::eLanguageTypeUnknown` and make it a plain `LanguageType`?
https://github.com/llvm/llvm-project/pull/181094
More information about the lldb-commits
mailing list