[OpenCL] Do not add builtins with unavailable types
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 21 Apr 2021 10:58:37 +0000 (11:58 +0100)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Wed, 21 Apr 2021 10:59:29 +0000 (11:59 +0100)
commite2b3b89bf1ce74bf889897e0353a3e3fa93e4452
treea7ea85ca9a10efa3c268d7eed5192e3c77013b5f
parentfdcb9c272899fc270bd9bd067dc20363f54ff190
[OpenCL] Do not add builtins with unavailable types

Add functionality to assign extensions to types in OpenCLBuiltins.td
and use that information to filter candidates that should not be
exposed if a type is not available.

Differential Revision: https://reviews.llvm.org/D100209
clang/lib/Sema/OpenCLBuiltins.td
clang/lib/Sema/SemaLookup.cpp
clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl
clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp