This is an archive of the discontinued LLVM Phabricator instance.

fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic
ClosedPublic

Authored by yonghong-song on Jul 11 2019, 2:14 PM.

Details

Summary

This is a followup patch for https://reviews.llvm.org/D61809.
Handle unnamed bitfield properly and add more test cases

Fixed the unnamed bitfield issue. The unnamed bitfield is ignored
by debug info, so we need to ignore such a struct/union member
when we try to get the member index in the debug info.

D61809 contains two test cases but not enough as it does
not checking generated IRs in the fine grain level, and also
it does not have semantics checking tests.
This patch added unit tests for both code gen and semantics checking for
the new intrinsic.

Diff Detail

Repository
rC Clang

Event Timeline

yonghong-song created this revision.Jul 11 2019, 2:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2019, 2:14 PM
yonghong-song added a subscriber: anakryiko.

change test case so we can test metadata is generated correctly.

ast accepted this revision.Jul 14 2019, 8:01 PM
This revision is now accepted and ready to land.Jul 14 2019, 8:01 PM
yonghong-song closed this revision.Jul 24 2019, 7:25 PM

The commit has been merged.