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