-
Notifications
You must be signed in to change notification settings - Fork 100
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
[CIR][IR] Fix parsing of dsolocal in cir.func #732
Conversation
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.
Looks like parse
and print
does not fully match. See the inline comment.
@@ -1935,6 +1936,8 @@ ParseResult cir::FuncOp::parse(OpAsmParser &parser, OperationState &state) { | |||
state.addAttribute(lambdaNameAttr, parser.getBuilder().getUnitAttr()); | |||
if (parser.parseOptionalKeyword(noProtoNameAttr).succeeded()) | |||
state.addAttribute(noProtoNameAttr, parser.getBuilder().getUnitAttr()); | |||
if (parser.parseOptionalKeyword(dsolocalNameAttr).succeeded()) | |||
state.addAttribute(dsolocalNameAttr, parser.getBuilder().getUnitAttr()); |
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.
According to FuncOp::print
, I believe dsolocal
should rather come after the visibility attribute? See in FuncOp::print
:
clangir/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
Lines 2129 to 2140 in 42a4292
if (getNoProto()) | |
p << "no_proto "; | |
if (getLinkage() != GlobalLinkageKind::ExternalLinkage) | |
p << stringifyGlobalLinkageKind(getLinkage()) << ' '; | |
auto vis = getVisibility(); | |
if (vis != mlir::SymbolTable::Visibility::Public) | |
p << vis << " "; | |
if (getDsolocal()) | |
p << "dsolocal "; |
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.
Thanks! good catch! fixed in the next commit
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.
LGTM!
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.
LGTM
as title. document will be in another PR as it seems to be a different upstream branch
as title. document will be in another PR as it seems to be a different upstream branch
as title. document will be in another PR as it seems to be a different upstream branch
as title. document will be in another PR as it seems to be a different upstream branch
as title. document will be in another PR as it seems to be a different upstream branch
as title. document will be in another PR as it seems to be a different upstream branch