LLVM  14.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 
14 
15 using namespace llvm;
16 using namespace llvm::codeview;
17 using namespace llvm::pdb;
18 
19 NativePublicSymbol::NativePublicSymbol(NativeSession &Session, SymIndexId Id,
20  const codeview::PublicSym32 &Sym)
21  : NativeRawSymbol(Session, PDB_SymType::PublicSymbol, Id), Sym(Sym) {}
22 
24 
26  PdbSymbolIdField ShowIdFields,
27  PdbSymbolIdField RecurseIdFields) const {
28  NativeRawSymbol::dump(OS, Indent, ShowIdFields, RecurseIdFields);
29  dumpSymbolField(OS, "name", getName(), Indent);
30  dumpSymbolField(OS, "offset", getAddressOffset(), Indent);
31  dumpSymbolField(OS, "section", getAddressSection(), Indent);
32 }
33 
35 
37 
38 std::string NativePublicSymbol::getName() const {
39  return std::string(Sym.Name);
40 }
41 
44 }
45 
48 }
NativePublicSymbol.h
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::pdb::NativeSession::getRVAFromSectOffset
uint32_t getRVAFromSectOffset(uint32_t Section, uint32_t Offset) const
Definition: NativeSession.cpp:373
llvm::codeview::PublicSym32
Definition: SymbolRecord.h:361
SymbolRecord.h
llvm::pdb::NativeSession::getVAFromSectOffset
uint64_t getVAFromSectOffset(uint32_t Section, uint32_t Offset) const
Definition: NativeSession.cpp:389
llvm::codeview::PublicSym32::Segment
uint16_t Segment
Definition: SymbolRecord.h:371
llvm::codeview::PublicSym32::Name
StringRef Name
Definition: SymbolRecord.h:372
llvm::pdb::NativePublicSymbol::getName
std::string getName() const override
Definition: NativePublicSymbol.cpp:38
llvm::pdb::PDB_SymType
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:243
llvm::codeview::PublicSym32::Offset
uint32_t Offset
Definition: SymbolRecord.h:370
llvm::pdb::NativePublicSymbol::getVirtualAddress
uint64_t getVirtualAddress() const override
Definition: NativePublicSymbol.cpp:46
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::pdb
Definition: ConcreteSymbolEnumerator.h:20
llvm::pdb::NativePublicSymbol::getRelativeVirtualAddress
uint32_t getRelativeVirtualAddress() const override
Definition: NativePublicSymbol.cpp:42
uint64_t
llvm::pdb::dumpSymbolField
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition: PDBExtras.h:47
llvm::pdb::NativePublicSymbol::getAddressOffset
uint32_t getAddressOffset() const override
Definition: NativePublicSymbol.cpp:34
uint32_t
llvm::pdb::NativePublicSymbol::dump
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
Definition: NativePublicSymbol.cpp:25
llvm::pdb::NativeRawSymbol::dump
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
Definition: NativeRawSymbol.cpp:22
llvm::pdb::NativeSession
Definition: NativeSession.h:28
NativeTypeEnum.h
llvm::codeview
Definition: AppendingTypeTableBuilder.h:22
llvm::pdb::PdbSymbolIdField
PdbSymbolIdField
Definition: IPDBRawSymbol.h:24
NativeTypeBuiltin.h
llvm::pdb::NativePublicSymbol::getAddressSection
uint32_t getAddressSection() const override
Definition: NativePublicSymbol.cpp:36
llvm::pdb::PDB_SymType::PublicSymbol
@ PublicSymbol
llvm::pdb::NativeRawSymbol::Session
NativeSession & Session
Definition: NativeRawSymbol.h:232
llvm::AMDGPU::VGPRIndexMode::Id
Id
Definition: SIDefines.h:231
llvm::pdb::NativePublicSymbol::~NativePublicSymbol
~NativePublicSymbol() override
Definition: NativePublicSymbol.cpp:23
llvm::pdb::NativePublicSymbol::Sym
const codeview::PublicSym32 Sym
Definition: NativePublicSymbol.h:37
llvm::pdb::NativeRawSymbol
Definition: NativeRawSymbol.h:21