LLVM 20.0.0git
DIATable.cpp
Go to the documentation of this file.
1//===- DIATable.cpp - DIA implementation of IPDBTable -----------*- 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
12using namespace llvm;
13using namespace llvm::pdb;
14
15DIATable::DIATable(CComPtr<IDiaTable> DiaTable) : Table(DiaTable) {}
16
18 LONG Count = 0;
19 return (S_OK == Table->get_Count(&Count)) ? Count : 0;
20}
21
22std::string DIATable::getName() const {
23 return invokeBstrMethod(*Table, &IDiaTable::get_name);
24}
25
27 CComBSTR Name16;
28 if (S_OK != Table->get_name(&Name16))
30
31 if (Name16 == DiaTable_Symbols)
33 if (Name16 == DiaTable_SrcFiles)
35 if (Name16 == DiaTable_Sections)
37 if (Name16 == DiaTable_LineNums)
39 if (Name16 == DiaTable_SegMap)
41 if (Name16 == DiaTable_InjSrc)
43 if (Name16 == DiaTable_FrameData)
45 if (Name16 == DiaTable_InputAssemblyFiles)
47 if (Name16 == DiaTable_Dbg)
48 return PDB_TableType::Dbg;
50}
std::string invokeBstrMethod(Obj &Object, HRESULT(__stdcall Obj::*Func)(BSTR *))
Definition: DIAUtils.h:16
uint32_t getItemCount() const override
Definition: DIATable.cpp:17
PDB_TableType getTableType() const override
Definition: DIATable.cpp:26
DIATable(CComPtr< IDiaTable > DiaTable)
Definition: DIATable.cpp:15
std::string getName() const override
Definition: DIATable.cpp:22
PDB_TableType
An enumeration indicating the type of data contained in this table.
Definition: PDBTypes.h:86
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18