LLVM
20.0.0git
include
llvm
MC
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
12
#include "
llvm/ADT/StringMapEntry.h
"
13
14
namespace
llvm
{
15
16
class
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.
22
struct
MCSymbolTableValue
{
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.
41
using
MCSymbolTableEntry
=
StringMapEntry<MCSymbolTableValue>
;
42
43
}
// end namespace llvm
44
45
#endif
StringMapEntry.h
This file defines the StringMapEntry class - it is intended to be a low dependency implementation det...
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition:
MCSymbol.h:41
llvm::StringMapEntry
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Definition:
StringMapEntry.h:102
llvm::ISD::MCSymbol
@ MCSymbol
Definition:
ISDOpcodes.h:178
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::MCSymbolTableValue
The value for an entry in the symbol table of an MCContext.
Definition:
MCSymbolTableEntry.h:22
llvm::MCSymbolTableValue::Used
bool Used
Whether the name associated with this value is used for a symbol.
Definition:
MCSymbolTableEntry.h:35
llvm::MCSymbolTableValue::NextUniqueID
unsigned NextUniqueID
The next ID to dole out to an unnamed assembler temporary symbol with the prefix (symbol table key).
Definition:
MCSymbolTableEntry.h:28
llvm::MCSymbolTableValue::Symbol
MCSymbol * Symbol
The symbol associated with the name, if any.
Definition:
MCSymbolTableEntry.h:24
Generated on Sat Dec 21 2024 20:59:29 for LLVM by
1.9.6