AddressSpaces.h revision 221339
1//===--- AddressSpaces.h - Language-specific address spaces -----*- 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 file provides definitions for the various language-specific address 11// spaces. 12// 13//===----------------------------------------------------------------------===// 14 15#ifndef LLVM_CLANG_BASIC_ADDRESSSPACES_H 16#define LLVM_CLANG_BASIC_ADDRESSSPACES_H 17 18namespace clang { 19 20namespace LangAS { 21 22/// This enum defines the set of possible language-specific address spaces. 23/// It uses a high starting offset so as not to conflict with any address 24/// space used by a target. 25enum ID { 26 Offset = 0xFFFF00, 27 28 opencl_global = Offset, 29 opencl_local, 30 opencl_constant, 31 32 Last, 33 Count = Last-Offset 34}; 35 36/// The type of a lookup table which maps from language-specific address spaces 37/// to target-specific ones. 38typedef unsigned Map[Count]; 39 40} 41 42} 43 44#endif 45