LLVM  8.0.0svn
NativeCompilandSymbol.cpp
Go to the documentation of this file.
1 //===- NativeCompilandSymbol.cpp - Native impl for compilands ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
12 
13 #include "llvm/ADT/STLExtras.h"
14 
15 namespace llvm {
16 namespace pdb {
17 
19  SymIndexId SymbolId,
21  : NativeRawSymbol(Session, PDB_SymType::Compiland, SymbolId), Module(MI) {}
22 
25 }
26 
28  PdbSymbolIdField ShowIdFields,
29  PdbSymbolIdField RecurseIdFields) const {
30  NativeRawSymbol::dump(OS, Indent, ShowIdFields, RecurseIdFields);
31 
32  dumpSymbolIdField(OS, "lexicalParentId", 0, Indent, Session,
33  PdbSymbolIdField::LexicalParent, ShowIdFields,
34  RecurseIdFields);
35  dumpSymbolField(OS, "libraryName", getLibraryName(), Indent);
36  dumpSymbolField(OS, "name", getName(), Indent);
37  dumpSymbolField(OS, "editAndContinueEnabled", isEditAndContinueEnabled(),
38  Indent);
39 }
40 
42  return Module.hasECInfo();
43 }
44 
46 
47 // The usage of getObjFileName for getLibraryName and getModuleName for getName
48 // may seem backwards, but it is consistent with DIA, which is what this API
49 // was modeled after. We may rename these methods later to try to eliminate
50 // this potential confusion.
51 
53  return Module.getObjFileName();
54 }
55 
56 std::string NativeCompilandSymbol::getName() const {
57  return Module.getModuleName();
58 }
59 
60 } // namespace pdb
61 } // namespace llvm
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:64
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:181
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition: PDBExtras.h:49
void dumpSymbolIdField(raw_ostream &OS, StringRef Name, SymIndexId Value, int Indent, const IPDBSession &Session, PdbSymbolIdField FieldId, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags)
Definition: PDBSymbol.cpp:186
bool isEditAndContinueEnabled() const override
NativeCompilandSymbol(NativeSession &Session, SymIndexId SymbolId, DbiModuleDescriptor MI)
std::string getLibraryName() const override
Definition: JSON.cpp:592
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
IRTranslator LLVM IR MI
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override