|
27 | 27 | #include "lldb/Utility/StructuredData.h"
|
28 | 28 | #include "lldb/Utility/Timeout.h"
|
29 | 29 | #include "lldb/Utility/UserIDResolver.h"
|
| 30 | +#include "lldb/Utility/XcodeSDK.h" |
30 | 31 | #include "lldb/lldb-private-forward.h"
|
31 | 32 | #include "lldb/lldb-public.h"
|
32 | 33 |
|
@@ -436,6 +437,39 @@ class Platform : public PluginInterface {
|
436 | 437 | return lldb_private::ConstString();
|
437 | 438 | }
|
438 | 439 |
|
| 440 | + /// Search each CU associated with the specified 'module' for |
| 441 | + /// the SDK paths the CUs were compiled against. In the presence |
| 442 | + /// of different SDKs, we try to pick the most appropriate one |
| 443 | + /// using \ref XcodeSDK::Merge. |
| 444 | + /// |
| 445 | + /// \param[in] module Module whose debug-info CUs to parse for |
| 446 | + /// which SDK they were compiled against. |
| 447 | + /// |
| 448 | + /// \returns If successful, returns a pair of a parsed XcodeSDK |
| 449 | + /// object and a boolean that is 'true' if we encountered |
| 450 | + /// a conflicting combination of SDKs when parsing the CUs |
| 451 | + /// (e.g., a public and internal SDK). |
| 452 | + virtual llvm::Expected<std::pair<XcodeSDK, bool>> |
| 453 | + GetSDKPathFromDebugInfo(Module &module) { |
| 454 | + return llvm::createStringError(llvm::formatv( |
| 455 | + "{0} not implemented for '{1}' platform.", __func__, GetName())); |
| 456 | + } |
| 457 | + |
| 458 | + /// Returns the full path of the most appropriate SDK for the |
| 459 | + /// specified 'module'. This function gets this path by parsing |
| 460 | + /// debug-info (see \ref `GetSDKPathFromDebugInfo`). |
| 461 | + /// |
| 462 | + /// \param[in] module Module whose debug-info to parse for |
| 463 | + /// which SDK it was compiled against. |
| 464 | + /// |
| 465 | + /// \returns If successful, returns the full path to an |
| 466 | + /// Xcode SDK. |
| 467 | + virtual llvm::Expected<std::string> |
| 468 | + ResolveSDKPathFromDebugInfo(Module &module) { |
| 469 | + return llvm::createStringError(llvm::formatv( |
| 470 | + "{0} not implemented for '{1}' platform.", __func__, GetName())); |
| 471 | + } |
| 472 | + |
439 | 473 | const std::string &GetRemoteURL() const { return m_remote_url; }
|
440 | 474 |
|
441 | 475 | bool IsHost() const {
|
|
0 commit comments