diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:00:46 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:00:46 +0000 |
| commit | 0414e226b73ef7952be3ef346c1c802e7f036f54 (patch) | |
| tree | ff0114c0524108a01707e4101f3224db0d7fd01f /lib/CodeGen/CGOpenCLRuntime.cpp | |
| parent | 97b17066aaac3f1590a809d79abe98fde03821ec (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/CGOpenCLRuntime.cpp')
| -rw-r--r-- | lib/CodeGen/CGOpenCLRuntime.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/CGOpenCLRuntime.cpp b/lib/CodeGen/CGOpenCLRuntime.cpp index 8af39ceecdfe1..686678962d3e3 100644 --- a/lib/CodeGen/CGOpenCLRuntime.cpp +++ b/lib/CodeGen/CGOpenCLRuntime.cpp @@ -99,3 +99,14 @@ llvm::Type *CGOpenCLRuntime::convertOpenCLSpecificType(const Type *T) { llvm::StructType::create(Ctx, "opencl.reserve_id_t"), 0); } } + +llvm::Type *CGOpenCLRuntime::getPipeType() { + if (!PipeTy){ + uint32_t PipeAddrSpc = + CGM.getContext().getTargetAddressSpace(LangAS::opencl_global); + PipeTy = llvm::PointerType::get(llvm::StructType::create( + CGM.getLLVMContext(), "opencl.pipe_t"), PipeAddrSpc); + } + + return PipeTy; +} |
