]> granicus.if.org Git - clang/commit
[OpenCL] Fixes bug of missing OCL version metadata on the AMDGCN target
authorYaxun Liu <Yaxun.Liu@amd.com>
Tue, 19 Jul 2016 19:39:45 +0000 (19:39 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Tue, 19 Jul 2016 19:39:45 +0000 (19:39 +0000)
commit0c8bf1e2bfb7b435f3a223661f52eacb5a77c325
treec1823304b2a3829a166c46352d43bce1b8d6f775
parentf837911b75b7ec224b2c65816782fdcca78eefa8
[OpenCL] Fixes bug of missing OCL version metadata on the AMDGCN target

Added the opencl.ocl.version metadata to be emitted with amdgcn. Created a static function emitOCLVerMD which is shared between triple spir and target amdgcn.

Also added new testcases to existing test file, spir_version.cl inside test/CodeGenOpenCL.

Patch by Aaron En Ye Shi.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276010 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInfo.cpp
test/CodeGenOpenCL/spir_version.cl