blob: 24b62823eb2e216ee71f4154c7e33d6f4f83f18f [file] [log] [blame]
Adrian McCarthy65d26882017-03-15 20:17:58 +00001//===- NativeCompilandSymbol.h - Native impl of PDBCompilandSymbol -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
10#include "llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h"
11
12namespace llvm {
13namespace pdb {
14
15NativeCompilandSymbol::NativeCompilandSymbol(NativeSession &Session,
16 const ModuleInfoEx &MI)
17 : NativeRawSymbol(Session), Module(MI) {}
18
19PDB_SymType NativeCompilandSymbol::getSymTag() const {
20 return PDB_SymType::Compiland;
21}
22
23bool NativeCompilandSymbol::isEditAndContinueEnabled() const {
24 return Module.Info.hasECInfo();
25}
26
27uint32_t NativeCompilandSymbol::getLexicalParentId() const { return 0; }
28
29// DIA, which this API was modeled after, uses counter-intuitive meanings for
30// IDiaSymbol::get_name and IDiaSymbol::get_libraryName, which is why these
31// methods may appear to be cross-mapped.
32
33std::string NativeCompilandSymbol::getLibraryName() const {
34 return Module.Info.getObjFileName();
35}
36
37std::string NativeCompilandSymbol::getName() const {
38 return Module.Info.getModuleName();
39}
40
41} // namespace pdb
42} // namespace llvm