HomePhabricator

[OpenCL] Add clang extension for function pointers.

Authored by Anastasia on Jan 6 2021, 11:05 AM.

Description

[OpenCL] Add clang extension for function pointers.

The new clang internal extension '__cl_clang_function_pointers'
allows use of function pointers and other features that have
the same functionality:

  • Use of member function pointers;
  • Unrestricted use of references to functions;
  • Virtual member functions.

This not a vendor extension and therefore it doesn't require any
special target support. Exposing this functionality fully
will require vendor or Khronos extension.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D94021