-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When inlining fields of a direct base class, extra padding would sometimes be added to ensure fields in the derived class are at the same offset as they are in the base class, even if one is packed and the other isn't. While this extra padding makes sure that fields end up at the same byte offset, the extra padding fields do shift the index of some fields. The `ComputeNonVirtualBaseClassGepPath` function in `CGClass.cpp` did not properly take into account the possibility these fields having a different index when inlined into a derived class. This is fixed by also adding base classes of the direct base of a derived class into the derived class' `NonVirtualBases` map.
- Loading branch information
Showing
3 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters