clang API Documentation

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