[PATCH] D64598: fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 14:14:31 PDT 2019


yonghong-song created this revision.
yonghong-song added reviewers: eli.friedman, jdoerfert, ast.
Herald added subscribers: kristina, arphaman, aprantl.
Herald added a project: clang.

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 <https://reviews.llvm.org/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.


Repository:
  rC Clang

https://reviews.llvm.org/D64598

Files:
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CodeGenFunction.h
  test/CodeGen/builtin-preserve-access-index.c
  test/Sema/builtin-preserve-access-index.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64598.209327.patch
Type: text/x-patch
Size: 9610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190711/3b56b7b0/attachment.bin>


More information about the cfe-commits mailing list