blob: 9a8430fb75003e08b341f44a8b1283058ae6a75f [file] [log] [blame]
Peter Collingbourne8c25fc52011-09-19 21:14:35 +00001//===----- 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
19namespace clang {
20
21class VarDecl;
22
23namespace CodeGen {
24
25class CodeGenFunction;
26class CodeGenModule;
27
28class CGOpenCLRuntime {
29protected:
30 CodeGenModule &CGM;
31
32public:
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