• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----- CGOpenCLRuntime.h - Interface to OpenCL Runtimes -----*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This provides an abstract class for OpenCL code generation.  Concrete
11 // subclasses of this implement code generation for specific OpenCL
12 // runtime libraries.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef CLANG_CODEGEN_OPENCLRUNTIME_H
17 #define CLANG_CODEGEN_OPENCLRUNTIME_H
18 
19 namespace clang {
20 
21 class VarDecl;
22 
23 namespace CodeGen {
24 
25 class CodeGenFunction;
26 class CodeGenModule;
27 
28 class CGOpenCLRuntime {
29 protected:
30   CodeGenModule &CGM;
31 
32 public:
CGOpenCLRuntime(CodeGenModule & CGM)33   CGOpenCLRuntime(CodeGenModule &CGM) : CGM(CGM) {}
34   virtual ~CGOpenCLRuntime();
35 
36   /// Emit the IR required for a work-group-local variable declaration, and add
37   /// an entry to CGF's LocalDeclMap for D.  The base class does this using
38   /// CodeGenFunction::EmitStaticVarDecl to emit an internal global for D.
39   virtual void EmitWorkGroupLocalVarDecl(CodeGenFunction &CGF,
40                                          const VarDecl &D);
41 };
42 
43 }
44 }
45 
46 #endif
47