-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix detection of cyclic structs and unions #116
Conversation
I'll review it after #114 is merged |
de2d51b
to
36545f0
Compare
36545f0
to
819ee7e
Compare
To break a cycle in one place:
It is also a good idea to minimize amount of fields where a cycle is broken (this is relevant for situations when one or more fields belong to multiple cycles).
Maybe it can be done by simply picking fields that belong to maximum number of cycles, but I cannot prove that now. |
6833e33
to
2be6f62
Compare
All supported cases are listed in tests/samples/Cycles.h |
2be6f62
to
4bc278e
Compare
607f4fc
to
4bc278e
Compare
b752706
to
bc0fea7
Compare
Break cycle only in one place. Support breaking cycles on complex types. Remove `avoid` parameter in TypeTranslator methods.
bc0fea7
to
e698e7f
Compare
Closes #103
Closes #115
Removed
CycleDetection
because it supported only limited cases and also it could find a cycle in a unsuccessful place: in a record that uses value instead of pointer (cycles may be "broken" only in pointer fields).So types in IR can contain cycles.
usesType
method was modified such that it does not get stuck in cycles.To do: