LLVM  9.0.0svn
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 
12 #include "llvm/ADT/STLExtras.h"
13 
14 namespace llvm {
15 namespace pdb {
16 
18  SymIndexId SymbolId,
20  : NativeRawSymbol(Session, PDB_SymType::Compiland, SymbolId), Module(MI) {}
21 
24 }
25 
27  PdbSymbolIdField ShowIdFields,
28  PdbSymbolIdField RecurseIdFields) const {
29  NativeRawSymbol::dump(OS, Indent, ShowIdFields, RecurseIdFields);
30 
31  dumpSymbolIdField(OS, "lexicalParentId", 0, Indent, Session,
32  PdbSymbolIdField::LexicalParent, ShowIdFields,
33  RecurseIdFields);
34  dumpSymbolField(OS, "libraryName", getLibraryName(), Indent);
35  dumpSymbolField(OS, "name", getName(), Indent);
36  dumpSymbolField(OS, "editAndContinueEnabled", isEditAndContinueEnabled(),
37  Indent);
38 }
39 
41  return Module.hasECInfo();
42 }
43 
45 
46 // The usage of getObjFileName for getLibraryName and getModuleName for getName
47 // may seem backwards, but it is consistent with DIA, which is what this API
48 // was modeled after. We may rename these methods later to try to eliminate
49 // this potential confusion.
50 
52  return Module.getObjFileName();
53 }
54 
55 std::string NativeCompilandSymbol::getName() const {
56  return Module.getModuleName();
57 }
58 
59 } // namespace pdb
60 } // namespace llvm
This class represents lattice values for constants.
Definition: AllocatorList.h:23
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:65
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
PDB_SymType getSymTag() const override
std::string getName() const override
SymIndexId getLexicalParentId() const override
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/bkedss5f.aspx.
Definition: PDBTypes.h:182
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition: PDBExtras.h:48
void dumpSymbolIdField(raw_ostream &OS, StringRef Name, SymIndexId Value, int Indent, const IPDBSession &Session, PdbSymbolIdField FieldId, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags)
Definition: PDBSymbol.cpp:185
bool isEditAndContinueEnabled() const override
NativeCompilandSymbol(NativeSession &Session, SymIndexId SymbolId, DbiModuleDescriptor MI)
std::string getLibraryName() const override
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
IRTranslator LLVM IR MI
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override