LLVM  8.0.1
DIATable.cpp
Go to the documentation of this file.
1 //===- DIATable.cpp - DIA implementation of IPDBTable -----------*- 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 using namespace llvm;
14 using namespace llvm::pdb;
15 
16 DIATable::DIATable(CComPtr<IDiaTable> DiaTable) : Table(DiaTable) {}
17 
19  LONG Count = 0;
20  return (S_OK == Table->get_Count(&Count)) ? Count : 0;
21 }
22 
23 std::string DIATable::getName() const {
24  return invokeBstrMethod(*Table, &IDiaTable::get_name);
25 }
26 
28  CComBSTR Name16;
29  if (S_OK != Table->get_name(&Name16))
31 
32  if (Name16 == DiaTable_Symbols)
34  if (Name16 == DiaTable_SrcFiles)
36  if (Name16 == DiaTable_Sections)
38  if (Name16 == DiaTable_LineNums)
40  if (Name16 == DiaTable_SegMap)
42  if (Name16 == DiaTable_InjSrc)
44  if (Name16 == DiaTable_FrameData)
46  if (Name16 == DiaTable_InputAssemblyFiles)
48  if (Name16 == DiaTable_Dbg)
49  return PDB_TableType::Dbg;
51 }
This class represents lattice values for constants.
Definition: AllocatorList.h:24
PDB_TableType getTableType() const override
Definition: DIATable.cpp:27
uint32_t getItemCount() const override
Definition: DIATable.cpp:18
std::string getName() const override
Definition: DIATable.cpp:23
std::string invokeBstrMethod(Obj &Object, HRESULT(__stdcall Obj::*Func)(BSTR *))
Definition: DIAUtils.h:17
PDB_TableType
An enumeration indicating the type of data contained in this table.
Definition: PDBTypes.h:85
DIATable(CComPtr< IDiaTable > DiaTable)
Definition: DIATable.cpp:16