diff options
author | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2017-08-15 09:38:18 +0000 |
---|---|---|
committer | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2017-08-15 09:38:18 +0000 |
commit | 7ac28eb0a5acdf20f912938e0c609426986bb866 (patch) | |
tree | 44473006ee2404c67873726f4b7462e33c478aef /lib/CodeGen/CodeGenModule.cpp | |
parent | 7890d5abb1ff405e1e7f98370964d8295cd0bc63 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 5ba95c99a7..fe45d16dc2 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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"), |