-
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][Codegen] RTTI support for virtual class inheritence #259
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2319,10 +2319,9 @@ LogicalResult TypeInfoAttr::verify( | |
return failure(); | ||
|
||
for (auto &member : typeinfoData) { | ||
auto gview = member.dyn_cast_or_null<GlobalViewAttr>(); | ||
if (gview) | ||
if (llvm::isa<GlobalViewAttr, IntAttr>(member)) | ||
continue; | ||
emitError() << "expected GlobalViewAttr attribute"; | ||
emitError() << "expected GlobalViewAttr or IntAttr attribute"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fact that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The integers are for
and
Updated doc for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was more curious about the meaning of those, which I just explained better in the other comment: use enum kind attributes for the flags. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can use a enum attribute for the flags, but the int attribute is still needed for |
||
return failure(); | ||
} | ||
|
||
|
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 still would prefer not to use an IntAttr but a enum kind attr that contains BCTI_Virtual, BCTI_Public, etc (and incrementally add the enums as we get usecases). Using
IntAttr
feels too opaque and already LLVM-like. Are there restrictions to doing such approach?