Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.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
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
42 return Session.getRVAFromSectOffset(Sym.Segment, Sym.Offset);
43}
44
46 return Session.getVAFromSectOffset(Sym.Segment, Sym.Offset);
47}
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
NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag, SymIndexId SymbolId)
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
uint32_t SymIndexId
Definition PDBTypes.h:26
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition PDBExtras.h:51
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.