Always emit kernel arg info for SPIR.
authorSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Thu, 4 Dec 2014 05:30:58 +0000 (05:30 +0000)
committerSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Thu, 4 Dec 2014 05:30:58 +0000 (05:30 +0000)
commitc6093fea0350cdaa9f4f24f9b36d976bd93e8c15
tree0b166b9b30ddef7ae97b5c635565ef92a0196392
parent5bf9578ce4d6ab896faf9a122955ff3523cc19b5
Always emit kernel arg info for SPIR.

http://llvm.org/bugs/show_bug.cgi?id=21555

Currently, kernel argument metadata is omitted unless the
"-cl-kernel-arg-info" option is specified. But the SPIR 1.2 spec
requires that all metadata except kernel_arg_name should always be
emitted, and kernel_arg_name is only emitted when
"-cl-kernel-arg-info" is specified.

Patch ported by Ryan Burn from the Khronos SPIR generator.
https://github.com/KhronosGroup/SPIR

llvm-svn: 223340
clang/lib/CodeGen/CodeGenFunction.cpp
clang/test/CodeGenOpenCL/kernel-arg-info.cl
clang/test/CodeGenOpenCL/kernel-attributes.cl
clang/test/CodeGenOpenCL/kernel-metadata.cl