-
Notifications
You must be signed in to change notification settings - Fork 444
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
Use IR::Annotation::nameAnnotation
everywhere instead of hard-coding @name
annotation name
#4628
Conversation
…ation name everywhere
@@ -32,7 +32,7 @@ control MyVerifyChecksum(inout headers hdr, inout metadata meta) { | |||
} | |||
} | |||
|
|||
@my_anno_5 @my_anno_3 control MyIngress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) { | |||
@my_anno_5 @my_anno_3 @name("MyIngress.inner_ctrl") control MyIngress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) { |
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.
Why do we have test output change here?
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.
@asl Apparently, we can't reference IR::Annotation::nameAnnotation
in a static container initializer list:
// set of annotations to _not_ propagate during inlining
std::set<cstring> Inline::noPropagateAnnotations = {"name"};
so it must remain hard-coded here.
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, order of static initializers in different TUs is not quite defined.
No description provided.