[OpenCL] Move printf declaration to opencl-c-base.h
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Thu, 18 Feb 2021 11:27:19 +0000 (11:27 +0000)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Thu, 18 Feb 2021 11:27:19 +0000 (11:27 +0000)
commit5a4a01460f1a8f29db9aa3581097dd8bc105425c
treea0435e4e027dba24b163f4d619d2d6b9fb94b0a4
parent1fbb3287fcda77d69a405dea17d7d11e1d3ac152
[OpenCL] Move printf declaration to opencl-c-base.h

Supporting `printf` with `-fdeclare-opencl-builtins` would require
special handling (for e.g. varargs and format attributes) for just
this one function.  Instead, move the `printf` declaration to the
shared base header.

Differential Revision: https://reviews.llvm.org/D96789
clang/lib/Headers/opencl-c-base.h
clang/lib/Headers/opencl-c.h