LLVM 20.0.0git
NativeCompilandSymbol.cpp
Go to the documentation of this file.
1//===- NativeCompilandSymbol.cpp - Native impl for compilands ---*- 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
11
12namespace llvm {
13namespace pdb {
14
16 SymIndexId SymbolId,
18 : NativeRawSymbol(Session, PDB_SymType::Compiland, SymbolId), Module(MI) {}
19
22}
23
25 PdbSymbolIdField ShowIdFields,
26 PdbSymbolIdField RecurseIdFields) const {
27 NativeRawSymbol::dump(OS, Indent, ShowIdFields, RecurseIdFields);
28
29 dumpSymbolIdField(OS, "lexicalParentId", 0, Indent, Session,
31 RecurseIdFields);
32 dumpSymbolField(OS, "libraryName", getLibraryName(), Indent);
33 dumpSymbolField(OS, "name", getName(), Indent);
34 dumpSymbolField(OS, "editAndContinueEnabled", isEditAndContinueEnabled(),
35 Indent);
36}
37
39 return Module.hasECInfo();
40}
41
43
44// The usage of getObjFileName for getLibraryName and getModuleName for getName
45// may seem backwards, but it is consistent with DIA, which is what this API
46// was modeled after. We may rename these methods later to try to eliminate
47// this potential confusion.
48
50 return std::string(Module.getObjFileName());
51}
52
53std::string NativeCompilandSymbol::getName() const {
54 return std::string(Module.getModuleName());
55}
56
57} // namespace pdb
58} // namespace llvm
IRTranslator LLVM IR MI
raw_pwrite_stream & OS
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
std::string getLibraryName() const override
bool isEditAndContinueEnabled() const override
PDB_SymType getSymTag() const override
std::string getName() const override
SymIndexId getLexicalParentId() const override
NativeCompilandSymbol(NativeSession &Session, SymIndexId SymbolId, DbiModuleDescriptor MI)
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
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: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
void dumpSymbolIdField(raw_ostream &OS, StringRef Name, SymIndexId Value, int Indent, const IPDBSession &Session, PdbSymbolIdField FieldId, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags)
Definition: PDBSymbol.cpp:202
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18