[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