]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/clang/Basic/AddressSpaces.h
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
[FreeBSD/FreeBSD.git] / include / clang / Basic / AddressSpaces.h
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
19 namespace clang {
20
21 namespace 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.
27 enum ID {
28   Offset = 0xFFFF00,
29
30   opencl_global = Offset,
31   opencl_local,
32   opencl_constant,
33   opencl_generic,
34
35   cuda_device,
36   cuda_constant,
37   cuda_shared,
38
39   Last,
40   Count = Last-Offset
41 };
42
43 /// The type of a lookup table which maps from language-specific address spaces
44 /// to target-specific ones.
45 typedef unsigned Map[Count];
46
47 }
48
49 }
50
51 #endif