[Lldb-commits] [lldb] [lldb][ClangModulesDeclVendor] Print Clang module loading errors to expression log instead of console (PR #166964)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 7 08:44:48 PST 2025


================
@@ -383,10 +383,11 @@ bool ClangExpressionSourceCode::GetText(
             block->CalculateSymbolContext(&sc);
 
             if (sc.comp_unit) {
-              StreamString error_stream;
-
-              decl_vendor->AddModulesForCompileUnit(
-                  *sc.comp_unit, modules_for_macros, error_stream);
+              if (auto err = decl_vendor->AddModulesForCompileUnit(
+                      *sc.comp_unit, modules_for_macros))
+                LLDB_LOG_ERROR(
----------------
adrian-prantl wrote:

Maybe add a comment here to explain that this isn't fatal and confusing for users, hence being printed to the log?

https://github.com/llvm/llvm-project/pull/166964


More information about the lldb-commits mailing list