clang API Documentation

CGOpenCLRuntime.h
Go to the documentation of this file.
00001 //===----- CGOpenCLRuntime.h - Interface to OpenCL Runtimes -----*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This provides an abstract class for OpenCL code generation.  Concrete
00011 // subclasses of this implement code generation for specific OpenCL
00012 // runtime libraries.
00013 //
00014 //===----------------------------------------------------------------------===//
00015 
00016 #ifndef CLANG_CODEGEN_OPENCLRUNTIME_H
00017 #define CLANG_CODEGEN_OPENCLRUNTIME_H
00018 
00019 namespace clang {
00020 
00021 class VarDecl;
00022 
00023 namespace CodeGen {
00024 
00025 class CodeGenFunction;
00026 class CodeGenModule;
00027 
00028 class CGOpenCLRuntime {
00029 protected:
00030   CodeGenModule &CGM;
00031 
00032 public:
00033   CGOpenCLRuntime(CodeGenModule &CGM) : CGM(CGM) {}
00034   virtual ~CGOpenCLRuntime();
00035 
00036   /// Emit the IR required for a work-group-local variable declaration, and add
00037   /// an entry to CGF's LocalDeclMap for D.  The base class does this using
00038   /// CodeGenFunction::EmitStaticVarDecl to emit an internal global for D.
00039   virtual void EmitWorkGroupLocalVarDecl(CodeGenFunction &CGF,
00040                                          const VarDecl &D);
00041 };
00042 
00043 }
00044 }
00045 
00046 #endif