[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


================
@@ -473,6 +473,38 @@ class Platform : public PluginInterface {
                       LLVM_PRETTY_FUNCTION, GetName()));
   }
 
+  /// Search CU for the SDK paths the CUs was compiled against. In the
+  /// presence of different SDKs, we try to pick the most appropriate
+  /// one using \ref XcodeSDK::Merge.
+  ///
+  /// \param[in] unit The CU
+  ///
+  /// \returns If successful, returns a pair of a parsed XcodeSDK
+  ///          object and a boolean that is 'true' if we encountered
+  ///          a conflicting combination of SDKs when parsing the CUs
+  ///          (e.g., a public and internal SDK).
+  virtual llvm::Expected<std::pair<XcodeSDK, bool>>
----------------
medismailben wrote:

Not very related to this change but it looks like this base `Platform` class which is supposed to be generic has some methods specific to the certain platforms ... 

This could be part of @bulbazord Platform refactor but maybe we should have a `SDK` base class that'd be returned here instead of the the Darwin platform specific `XcodeSDK` return type. 

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


More information about the lldb-commits mailing list