summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorSven van Haastregt <sven.vanhaastregt@arm.com>2017-08-15 09:38:18 +0000
committerSven van Haastregt <sven.vanhaastregt@arm.com>2017-08-15 09:38:18 +0000
commitefb4d4c78c647c9a0fd94b4de238ea2d386fc2d2 (patch)
tree8659d5f2b37b53a3b4532cac8f134c1aaf72a76a /clang/lib/CodeGen/CodeGenModule.cpp
parent25e2800e206af4e703c6d5ddbf81aa146cea1ec4 (diff)
downloadbcm5719-llvm-efb4d4c78c647c9a0fd94b4de238ea2d386fc2d2.tar.gz
bcm5719-llvm-efb4d4c78c647c9a0fd94b4de238ea2d386fc2d2.zip
[OpenCL] Allow targets to select address space per type
Generalize getOpenCLImageAddrSpace into getOpenCLTypeAddrSpace, such that targets can select the address space per type. No functional changes intended. Initial patch by Simon Perretta. Differential Revision: https://reviews.llvm.org/D33989 llvm-svn: 310911
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 5ba95c99a79..fe45d16dc2d 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -4536,7 +4536,7 @@ llvm::Value *
CodeGenModule::createOpenCLIntToSamplerConversion(const Expr *E,
CodeGenFunction &CGF) {
llvm::Constant *C = EmitConstantExpr(E, E->getType(), &CGF);
- auto SamplerT = getOpenCLRuntime().getSamplerType();
+ auto SamplerT = getOpenCLRuntime().getSamplerType(E->getType().getTypePtr());
auto FTy = llvm::FunctionType::get(SamplerT, {C->getType()}, false);
return CGF.Builder.CreateCall(CreateRuntimeFunction(FTy,
"__translate_sampler_initializer"),
OpenPOWER on IntegriCloud