[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 6 12:52:10 PST 2024


================
@@ -1429,3 +1430,40 @@ PlatformDarwin::ResolveSDKPathFromDebugInfo(Module &module) {
 
   return path_or_err->str();
 }
+
+llvm::Expected<std::pair<XcodeSDK, bool>>
+PlatformDarwin::GetSDKPathFromDebugInfo(CompileUnit &unit) {
+  ModuleSP module_sp = unit.CalculateSymbolContextModule();
+  if (!module_sp)
+    return llvm::createStringError("compile unit has no module");
+  SymbolFile *sym_file = module_sp->GetSymbolFile();
+  if (!sym_file)
+    return llvm::createStringError(
+        llvm::formatv("No symbol file available for module '{0}'",
+                      module_sp->GetFileSpec().GetFilename()));
+
+  const bool found_mismatch = false;
----------------
medismailben wrote:

Looks like this is never mutated and not used at all ... do we actually  need it ?

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


More information about the lldb-commits mailing list