[Lldb-commits] [lldb] [lldb][NFC] Inline ResolveSDKPathFromDebugInfo in one of its call site (PR #146062)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 30 05:19:38 PDT 2025
================
@@ -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;
----------------
Michael137 wrote:
Don't think we want to return here? We used to just to log the error. How about we return `llvm::Expected` from `ResolveSDKPathFromDebugInfo` and don't pass the sysroot_spec as an output parameter?
https://github.com/llvm/llvm-project/pull/146062
More information about the lldb-commits
mailing list