-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[RemoteAST/Reflection] Changes to MetadataReader and its users to track function parameter flags #12421
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
Conversation
BuiltType Type; | ||
StringRef Label; | ||
|
||
union { |
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.
This shouldn't be a union.
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.
Ah, sorry, I wanted to change that to be to enum like other flags we have...
if (auto ArgumentTypeRef = readTypeFromMetadata(FlaggedArgumentAddress)) | ||
Arguments.push_back(ArgumentTypeRef); | ||
else | ||
FlaggedArgumentAddress &= ~InOutMask; |
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.
shared
and variadic
, too? It's odd to have them partially-supported, so I suggest either completing support or leaving a FIXME to do it all later.
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.
Yes, that's the next step after MetadataReader
is updated to support these flags I'm going to update function metadata itself to include all of the flags for parameters...
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.
Added a FIXME about it on L807, going to address after this changes are in.
2b0c7bb
to
6dd6d01
Compare
template <typename BuiltType> class FunctionParam { | ||
BuiltType Type; | ||
StringRef Label; | ||
ParameterTypeFlags Flags; |
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.
@DougGregor please let me know what you think about this? I'm not sure if it's comme il faut to use structures from AST/Types.h
in here.
9831b69
to
af7f1ea
Compare
@swift-ci please clean test |
@slavapestov it looks like I should be bugging you about changes to Reflection/RemoteAST instead :) |
af7f1ea
to
c9d70dc
Compare
@swift-ci please clean test |
No description provided.