1 //===----- CGOpenCLRuntime.h - Interface to OpenCL Runtimes -----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This provides an abstract class for OpenCL code generation. Concrete
11 // subclasses of this implement code generation for specific OpenCL
14 //===----------------------------------------------------------------------===//
16 #ifndef CLANG_CODEGEN_OPENCLRUNTIME_H
17 #define CLANG_CODEGEN_OPENCLRUNTIME_H
19 #include "clang/AST/Type.h"
20 #include "llvm/IR/Type.h"
21 #include "llvm/IR/Value.h"
29 class CodeGenFunction;
32 class CGOpenCLRuntime {
37 CGOpenCLRuntime(CodeGenModule &CGM) : CGM(CGM) {}
38 virtual ~CGOpenCLRuntime();
40 /// Emit the IR required for a work-group-local variable declaration, and add
41 /// an entry to CGF's LocalDeclMap for D. The base class does this using
42 /// CodeGenFunction::EmitStaticVarDecl to emit an internal global for D.
43 virtual void EmitWorkGroupLocalVarDecl(CodeGenFunction &CGF,
46 virtual llvm::Type *convertOpenCLSpecificType(const Type *T);