• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===-------- llvm/IR/Value.def - File that describes Values ---v-*- 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 contains descriptions of the various LLVM values.  This is
11// used as a central place for enumerating the different values.
12//
13//===----------------------------------------------------------------------===//
14
15// NOTE: NO INCLUDE GUARD DESIRED!
16
17// Provide definitions of macros so that users of this file do not have to
18// define everything to use it...
19//
20#if !(defined HANDLE_GLOBAL_VALUE || defined HANDLE_CONSTANT ||                \
21      defined HANDLE_INSTRUCTION || defined HANDLE_INLINE_ASM_VALUE ||         \
22      defined HANDLE_METADATA_VALUE || defined HANDLE_VALUE ||                 \
23      defined HANDLE_CONSTANT_MARKER)
24#error "Missing macro definition of HANDLE_VALUE*"
25#endif
26
27#ifndef HANDLE_GLOBAL_VALUE
28#define HANDLE_GLOBAL_VALUE(ValueName) HANDLE_CONSTANT(ValueName)
29#endif
30
31#ifndef HANDLE_CONSTANT
32#define HANDLE_CONSTANT(ValueName) HANDLE_VALUE(ValueName)
33#endif
34
35#ifndef HANDLE_INSTRUCTION
36#define HANDLE_INSTRUCTION(ValueName) HANDLE_VALUE(ValueName)
37#endif
38
39#ifndef HANDLE_INLINE_ASM_VALUE
40#define HANDLE_INLINE_ASM_VALUE(ValueName) HANDLE_VALUE(ValueName)
41#endif
42
43#ifndef HANDLE_METADATA_VALUE
44#define HANDLE_METADATA_VALUE(ValueName) HANDLE_VALUE(ValueName)
45#endif
46
47#ifndef HANDLE_VALUE
48#define HANDLE_VALUE(ValueName)
49#endif
50
51#ifndef HANDLE_CONSTANT_MARKER
52#define HANDLE_CONSTANT_MARKER(MarkerName, ValueName)
53#endif
54
55HANDLE_VALUE(Argument)
56HANDLE_VALUE(BasicBlock)
57HANDLE_VALUE(MemoryUse)
58HANDLE_VALUE(MemoryDef)
59HANDLE_VALUE(MemoryPhi)
60
61HANDLE_GLOBAL_VALUE(Function)
62HANDLE_GLOBAL_VALUE(GlobalAlias)
63HANDLE_GLOBAL_VALUE(GlobalIFunc)
64HANDLE_GLOBAL_VALUE(GlobalVariable)
65HANDLE_CONSTANT(BlockAddress)
66HANDLE_CONSTANT(ConstantExpr)
67
68// ConstantAggregate.
69HANDLE_CONSTANT(ConstantArray)
70HANDLE_CONSTANT(ConstantStruct)
71HANDLE_CONSTANT(ConstantVector)
72
73// ConstantData.
74HANDLE_CONSTANT(UndefValue)
75HANDLE_CONSTANT(ConstantAggregateZero)
76HANDLE_CONSTANT(ConstantDataArray)
77HANDLE_CONSTANT(ConstantDataVector)
78HANDLE_CONSTANT(ConstantInt)
79HANDLE_CONSTANT(ConstantFP)
80HANDLE_CONSTANT(ConstantPointerNull)
81HANDLE_CONSTANT(ConstantTokenNone)
82
83HANDLE_METADATA_VALUE(MetadataAsValue)
84HANDLE_INLINE_ASM_VALUE(InlineAsm)
85
86HANDLE_INSTRUCTION(Instruction)
87// Enum values starting at InstructionVal are used for Instructions;
88// don't add new values here!
89
90HANDLE_CONSTANT_MARKER(ConstantFirstVal, Function)
91HANDLE_CONSTANT_MARKER(ConstantLastVal, ConstantTokenNone)
92HANDLE_CONSTANT_MARKER(ConstantDataFirstVal, UndefValue)
93HANDLE_CONSTANT_MARKER(ConstantDataLastVal, ConstantTokenNone)
94HANDLE_CONSTANT_MARKER(ConstantAggregateFirstVal, ConstantArray)
95HANDLE_CONSTANT_MARKER(ConstantAggregateLastVal, ConstantVector)
96
97#undef HANDLE_GLOBAL_VALUE
98#undef HANDLE_CONSTANT
99#undef HANDLE_INSTRUCTION
100#undef HANDLE_METADATA_VALUE
101#undef HANDLE_INLINE_ASM_VALUE
102#undef HANDLE_VALUE
103#undef HANDLE_CONSTANT_MARKER
104