LLVM  8.0.1
SlotMapping.h
Go to the documentation of this file.
1 //===-- SlotMapping.h - Slot number mapping for unnamed values --*- 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 the declaration of the SlotMapping struct.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_ASMPARSER_SLOTMAPPING_H
15 #define LLVM_ASMPARSER_SLOTMAPPING_H
16 
17 #include "llvm/ADT/StringMap.h"
18 #include "llvm/IR/TrackingMDRef.h"
19 #include <map>
20 #include <vector>
21 
22 namespace llvm {
23 
24 class GlobalValue;
25 class Type;
26 
27 /// This struct contains the mappings from the slot numbers to unnamed metadata
28 /// nodes, global values and types. It also contains the mapping for the named
29 /// types.
30 /// It can be used to save the parsing state of an LLVM IR module so that the
31 /// textual references to the values in the module can be parsed outside of the
32 /// module's source.
33 struct SlotMapping {
34  std::vector<GlobalValue *> GlobalValues;
35  std::map<unsigned, TrackingMDNodeRef> MetadataNodes;
37  std::map<unsigned, Type *> Types;
38 };
39 
40 } // end namespace llvm
41 
42 #endif
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
Definition: MsgPackReader.h:49
This class represents lattice values for constants.
Definition: AllocatorList.h:24
std::map< unsigned, TrackingMDNodeRef > MetadataNodes
Definition: SlotMapping.h:35
StringMap< Type * > NamedTypes
Definition: SlotMapping.h:36
std::vector< GlobalValue * > GlobalValues
Definition: SlotMapping.h:34
std::map< unsigned, Type * > Types
Definition: SlotMapping.h:37
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:220
This struct contains the mappings from the slot numbers to unnamed metadata nodes, global values and types.
Definition: SlotMapping.h:33