Skip to content

Add interface for lookup of externally stored field descriptors #69752

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

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

augusto2112
Copy link
Contributor

This is a follow up patch that wraps field descriptors and field records in an abstract interface, and allows descriptor finders to look them up.

@augusto2112 augusto2112 requested a review from a team as a code owner November 9, 2023 18:06
@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

@@ -39,13 +41,69 @@ struct BuiltinTypeDescriptorBase {
virtual llvm::StringRef getMangledTypeName() = 0;
};

/// An abstract interface for a field record.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a FieldRecord versus a FieldDescriptor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A field descriptor describes a nominal type, it has an array of field records, which describes that type's fields.

/// Load unsubstituted field types for a nominal type.
RemoteRef<FieldDescriptor> getFieldTypeInfo(const TypeRef *TR);
std::unique_ptr<FieldDescriptorBase>
getFieldDescriptor(const TypeRef *TR) override;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did the comment go?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the whole function, including comment, to a private section.

This is a follow up patch that wraps field descriptors and field records
in an abstract interface, and allows descriptor finders to look them up.
@augusto2112 augusto2112 force-pushed the field-descriptor-interface branch from 95ec562 to e05e3ae Compare November 9, 2023 20:33
@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

@augusto2112 augusto2112 merged commit 254ecb6 into swiftlang:main Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants