================ @@ -1128,17 +1128,8 @@ void PlatformDarwin::AddClangModuleCompilationOptionsForSDKType( FileSpec sysroot_spec; - if (target) { - if (ModuleSP exe_module_sp = target->GetExecutableModule()) { - auto path_or_err = ResolveSDKPathFromDebugInfo(*exe_module_sp); - if (path_or_err) { - sysroot_spec = FileSpec(*path_or_err); - } else { - LLDB_LOG_ERROR(GetLog(LLDBLog::Types | LLDBLog::Host), - path_or_err.takeError(), - "Failed to resolve SDK path: {0}"); - } - } + if (target && ResolveSDKPathFromDebugInfo(target, sysroot_spec)) { + return; ---------------- charles-zablit wrote:
I fixed the logic and switched to an `llvm::Expected` return type. The underlying error are logged after the function is called. https://github.com/llvm/llvm-project/pull/146062 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits