This is an archive of the discontinued LLVM Phabricator instance.

Fix resolution of certain recursive types.
ClosedPublic

Authored by sas on Apr 20 2015, 12:32 PM.

Details

Summary

This is a cross-port of r234441.

If a struct type S has a member T that has a member that is a function that
returns a typedef of S* the respective field would be duplicated, which caused
an assert down the line in RecordLayoutBuilder. This patch adds a check that
removes the possibility of trying to resolve the same type twice within the
same callstack.

This commit also adds unit tests for these failures.

Fixes https://llvm.org/bugs/show_bug.cgi?id=20486.

Patch by Cristian Hancila.

Diff Detail

Repository
rL LLVM

Event Timeline

sas updated this revision to Diff 24049.Apr 20 2015, 12:32 PM
sas retitled this revision from to Fix resolution of certain recursive types..
sas updated this object.
sas edited the test plan for this revision. (Show Details)
sas added reviewers: clayborg, spyffe, hans.
sas added a subscriber: Unknown Object (MLST).
clayborg accepted this revision.Apr 20 2015, 12:35 PM
clayborg edited edge metadata.

I'm good as long as Sean is good with this.

This revision is now accepted and ready to land.Apr 20 2015, 12:35 PM
spyffe accepted this revision.Apr 20 2015, 12:36 PM
spyffe edited edge metadata.

I'm a fan.

This revision was automatically updated to reflect the committed changes.