LLVM 19.0.0git
NativePublicSymbol.cpp
Go to the documentation of this file.
1//===- NativePublicSymbol.cpp - info about public symbols -------*- 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
10
13
14using namespace llvm;
15using namespace llvm::codeview;
16using namespace llvm::pdb;
17
20 : NativeRawSymbol(Session, PDB_SymType::PublicSymbol, Id), Sym(Sym) {}
21
23
25 PdbSymbolIdField ShowIdFields,
26 PdbSymbolIdField RecurseIdFields) const {
27 NativeRawSymbol::dump(OS, Indent, ShowIdFields, RecurseIdFields);
28 dumpSymbolField(OS, "name", getName(), Indent);
29 dumpSymbolField(OS, "offset", getAddressOffset(), Indent);
30 dumpSymbolField(OS, "section", getAddressSection(), Indent);
31}
32
34
36
37std::string NativePublicSymbol::getName() const {
38 return std::string(Sym.Name);
39}
40
43}
44
47}
Symbol * Sym
Definition: ELF_riscv.cpp:479
raw_pwrite_stream & OS
uint32_t getAddressOffset() const override
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
uint64_t getVirtualAddress() const override
uint32_t getAddressSection() const override
NativePublicSymbol(NativeSession &Session, SymIndexId Id, const codeview::PublicSym32 &Sym)
std::string getName() const override
uint32_t getRelativeVirtualAddress() const override
const codeview::PublicSym32 Sym
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
uint64_t getVAFromSectOffset(uint32_t Section, uint32_t Offset) const
uint32_t getRVAFromSectOffset(uint32_t Section, uint32_t Offset) const
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition: PDBExtras.h:47
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:243
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18