clang API Documentation
00001 //===--- AddressSpaces.h - Language-specific address spaces -----*- 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 /// \file 00011 /// \brief Provides definitions for the various language-specific address 00012 /// spaces. 00013 /// 00014 //===----------------------------------------------------------------------===// 00015 00016 #ifndef LLVM_CLANG_BASIC_ADDRESSSPACES_H 00017 #define LLVM_CLANG_BASIC_ADDRESSSPACES_H 00018 00019 namespace clang { 00020 00021 namespace LangAS { 00022 00023 /// \brief Defines the set of possible language-specific address spaces. 00024 /// 00025 /// This uses a high starting offset so as not to conflict with any address 00026 /// space used by a target. 00027 enum ID { 00028 Offset = 0xFFFF00, 00029 00030 opencl_global = Offset, 00031 opencl_local, 00032 opencl_constant, 00033 00034 cuda_device, 00035 cuda_constant, 00036 cuda_shared, 00037 00038 Last, 00039 Count = Last-Offset 00040 }; 00041 00042 /// The type of a lookup table which maps from language-specific address spaces 00043 /// to target-specific ones. 00044 typedef unsigned Map[Count]; 00045 00046 } 00047 00048 } 00049 00050 #endif