LLVM 19.0.0git
SlotMapping.h
Go to the documentation of this file.
1//===-- SlotMapping.h - Slot number mapping for unnamed values --*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the declaration of the SlotMapping struct.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_ASMPARSER_SLOTMAPPING_H
14#define LLVM_ASMPARSER_SLOTMAPPING_H
15
16#include "llvm/ADT/StringMap.h"
19#include <map>
20#include <vector>
21
22namespace llvm {
23
24class GlobalValue;
25class 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.
35 std::map<unsigned, TrackingMDNodeRef> MetadataNodes;
37 std::map<unsigned, Type *> Types;
38};
39
40} // end namespace llvm
41
42#endif
This file defines the StringMap class.
RelocType Type
Definition: COFFYAML.cpp:391
Mapping from value ID to value, which also remembers what the next unused ID is.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:127
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
This struct contains the mappings from the slot numbers to unnamed metadata nodes,...
Definition: SlotMapping.h:33
std::map< unsigned, Type * > Types
Definition: SlotMapping.h:37
StringMap< Type * > NamedTypes
Definition: SlotMapping.h:36
std::map< unsigned, TrackingMDNodeRef > MetadataNodes
Definition: SlotMapping.h:35
NumberedValues< GlobalValue * > GlobalValues
Definition: SlotMapping.h:34