[PATCH] D67883: [CLANG][BPF] permit any argument type for __builtin_preserve_access_index()

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 21 10:51:01 PDT 2019


yonghong-song created this revision.
yonghong-song added a reviewer: ast.
Herald added subscribers: cfe-commits, arphaman.
Herald added a project: clang.

Commit c15aa241f821 <https://reviews.llvm.org/rGc15aa241f8213334f6980b7981cee1f28f81112a> ("[CLANG][BPF] change __builtin_preserve_access_index()
signature") changed the builtin function signature to

  PointerT __builtin_preserve_access_index(PointerT ptr)

with a pointer type as the argument/return type, where argument and
return types must be the same.

There is really no reason for this constraint. The builtin just
presented a code region so that IR builtins

  __builtin_{array, struct, union}_preserve_access_index

can be applied.

This patch removed the pointer type restriction to permit any
argument type as long as it is permitted by the compiler.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67883

Files:
  clang/docs/LanguageExtensions.rst
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Sema/SemaChecking.cpp
  clang/test/CodeGen/builtin-preserve-access-index-nonptr.c
  clang/test/Sema/builtin-preserve-access-index.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67883.221187.patch
Type: text/x-patch
Size: 4485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190921/3dfc4d3f/attachment-0001.bin>


More information about the cfe-commits mailing list