-
Notifications
You must be signed in to change notification settings - Fork 341
[lldb] Reimplement and implement GetPointerType #1908
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
[lldb] Reimplement and implement GetPointerType #1908
Conversation
@@ -90,8 +90,7 @@ GetClangTypeNode(CompilerType clang_type, swift::Demangle::Demangler &dem) { | |||
} | |||
|
|||
/// \return the child of the \p Type node. | |||
static swift::Demangle::NodePointer GetType(swift::Demangle::Demangler &dem, | |||
swift::Demangle::NodePointer n) { | |||
static NodePointer GetType(swift::Demangle::NodePointer n) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the unused Demangler
parameter.
@swift-ci test |
A follow up will be to fix the following:
|
Looking closer at this output:
|
lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp
Outdated
Show resolved
Hide resolved
lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from some stylistic nitpicks inline, this looks good!
I guess that is coming from a C-centric view that arrays and pointers are interchangeable. It does make much less sense in Swift. |
... but that's a separate problem that presumably affects all pointer types. |
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Reimplement
SwiftASTContext::GetPointerType
to return the given type wrapped inUnsafePointer<T>
. Also implementTypeSystemSwiftTypeRef::GetPointerType
with a matching demangle-based implementation that also wraps inUnsafePointer
.Given a variable
x: Int
, here is some output:rdar://68171356