]> granicus.if.org Git - clang/commit
[OpenCL] Fix code generation of function-scope constant samplers.
authorAlexey Bader <alexey.bader@intel.com>
Wed, 15 Nov 2017 11:38:17 +0000 (11:38 +0000)
committerAlexey Bader <alexey.bader@intel.com>
Wed, 15 Nov 2017 11:38:17 +0000 (11:38 +0000)
commit0f512ed5d31bb3b8aa0b07d50e37735c02600b51
tree1b62e91d7e7307ba642f412ac718c72d8200391f
parentc0576335506e05f53c2c05690246811da220a9a7
[OpenCL] Fix code generation of function-scope constant samplers.

Summary:
Constant samplers are handled as static variables and clang's code generation
library, which leads to llvm::unreachable. We bypass emitting sampler variable
as static since it's translated to a function call later.

Reviewers: yaxunl, Anastasia

Reviewed By: yaxunl, Anastasia

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318290 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDecl.cpp
test/CodeGenOpenCL/sampler.cl
test/SemaOpenCL/sampler_t.cl