================ @@ -1203,26 +1203,23 @@ bool StackFrame::IsArtificial() const { return m_stack_frame_kind == StackFrame::Kind::Artificial; } -lldb::LanguageType StackFrame::GetLanguage() { +SourceLanguage StackFrame::GetLanguage() { CompileUnit *cu = GetSymbolContext(eSymbolContextCompUnit).comp_unit; if (cu) return cu->GetLanguage(); - return lldb::eLanguageTypeUnknown; + return {}; } -lldb::LanguageType StackFrame::GuessLanguage() { - LanguageType lang_type = GetLanguage(); +SourceLanguage StackFrame::GuessLanguage() { + SourceLanguage lang_type = GetLanguage(); if (lang_type == eLanguageTypeUnknown) { - SymbolContext sc = GetSymbolContext(eSymbolContextFunction - | eSymbolContextSymbol); - if (sc.function) { - lang_type = sc.function->GetMangled().GuessLanguage(); - } + SymbolContext sc = + GetSymbolContext(eSymbolContextFunction | eSymbolContextSymbol); + if (sc.function) + lang_type = LanguageType(sc.function->GetMangled().GuessLanguage()); ---------------- Michael137 wrote:
This works because the `SourceLanguage(LanguageType)` constructor isn't marked explicit. Would it be clearer to mark it explicit and instead rewrite this as `SourceLanguage(sc.function->GetMangled().GuessLanguage())` https://github.com/llvm/llvm-project/pull/89981 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits