-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[lldb] Add a per-CU API to read the SDK #119022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -473,6 +473,32 @@ class Platform : public PluginInterface { | |
| LLVM_PRETTY_FUNCTION, GetName())); | ||
| } | ||
|
|
||
| /// Search CU for the SDK path the CUs was compiled against. | ||
| /// | ||
| /// \param[in] unit The CU | ||
| /// | ||
| /// \returns If successful, returns a parsed XcodeSDK object. | ||
| virtual llvm::Expected<XcodeSDK> GetSDKPathFromDebugInfo(CompileUnit &unit) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we abstract a base class for SDK and have XcodeSDK become a plug-in?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd volunteer to do that work if we had another platform that also has a concept of an SDK. Otherwise it'd be dangerous that I design the base class to be way too close to Xcode's SDK properties. |
||
| return llvm::createStringError( | ||
| llvm::formatv("{0} not implemented for '{1}' platform.", | ||
| LLVM_PRETTY_FUNCTION, GetName())); | ||
| } | ||
|
|
||
| /// Returns the full path of the most appropriate SDK for the | ||
| /// specified compile unit. This function gets this path by parsing | ||
| /// debug-info (see \ref `GetSDKPathFromDebugInfo`). | ||
| /// | ||
| /// \param[in] unit The CU to scan. | ||
| /// | ||
| /// \returns If successful, returns the full path to an | ||
| /// Xcode SDK. | ||
| virtual llvm::Expected<std::string> | ||
adrian-prantl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ResolveSDKPathFromDebugInfo(CompileUnit &unit) { | ||
| return llvm::createStringError( | ||
| llvm::formatv("{0} not implemented for '{1}' platform.", | ||
| LLVM_PRETTY_FUNCTION, GetName())); | ||
| } | ||
|
|
||
| bool IsHost() const { | ||
| return m_is_host; // Is this the default host platform? | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.