LLVM 20.0.0git
MCSymbolTableEntry.h
Go to the documentation of this file.
1//===-- llvm/MC/MCSymbolTableEntry.h - Symbol table entry -------*- 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#ifndef LLVM_MC_MCSYMBOLTABLEENTRY_H
10#define LLVM_MC_MCSYMBOLTABLEENTRY_H
11
13
14namespace llvm {
15
16class MCSymbol;
17
18/// The value for an entry in the symbol table of an MCContext.
19///
20/// This is in a separate file, because MCSymbol uses MCSymbolTableEntry (see
21/// below) to reuse the name that is stored in the symbol table.
23 /// The symbol associated with the name, if any.
24 MCSymbol *Symbol = nullptr;
25
26 /// The next ID to dole out to an unnamed assembler temporary symbol with
27 /// the prefix (symbol table key).
28 unsigned NextUniqueID = 0;
29
30 /// Whether the name associated with this value is used for a symbol. This is
31 /// not necessarily true: sometimes, we use a symbol table value without an
32 /// associated symbol for accessing NextUniqueID when a suffix is added to a
33 /// name. However, Used might be true even if Symbol is nullptr: temporary
34 /// named symbols are not added to the symbol table.
35 bool Used = false;
36};
37
38/// MCContext stores MCSymbolTableValue in a string map (see MCSymbol::operator
39/// new). To avoid redundant storage of the name, MCSymbol stores a pointer (8
40/// bytes -- half the size of a StringRef) to the entry to access it.
42
43} // end namespace llvm
44
45#endif
This file defines the StringMapEntry class - it is intended to be a low dependency implementation det...
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
The value for an entry in the symbol table of an MCContext.
bool Used
Whether the name associated with this value is used for a symbol.
unsigned NextUniqueID
The next ID to dole out to an unnamed assembler temporary symbol with the prefix (symbol table key).
MCSymbol * Symbol
The symbol associated with the name, if any.