You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.225
Former-commit-id: 10196d987d5fc5564b9d3b33b1fdf13190f4d0b5
This commit is contained in:
parent
32d52ae4ca
commit
f32dbaf0b2
53
external/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp
vendored
Normal file
53
external/llvm/lib/DebugInfo/PDB/DIA/DIAEnumTables.cpp
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
//===- DIAEnumTables.cpp - DIA Table Enumerator Impl ------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/DebugInfo/PDB/DIA/DIAEnumTables.h"
|
||||
#include "llvm/DebugInfo/PDB/DIA/DIATable.h"
|
||||
|
||||
using namespace llvm;
|
||||
using namespace llvm::pdb;
|
||||
|
||||
DIAEnumTables::DIAEnumTables(
|
||||
CComPtr<IDiaEnumTables> DiaEnumerator)
|
||||
: Enumerator(DiaEnumerator) {}
|
||||
|
||||
uint32_t DIAEnumTables::getChildCount() const {
|
||||
LONG Count = 0;
|
||||
return (S_OK == Enumerator->get_Count(&Count)) ? Count : 0;
|
||||
}
|
||||
|
||||
std::unique_ptr<IPDBTable>
|
||||
DIAEnumTables::getChildAtIndex(uint32_t Index) const {
|
||||
CComPtr<IDiaTable> Item;
|
||||
VARIANT Var;
|
||||
Var.vt = VT_UINT;
|
||||
Var.uintVal = Index;
|
||||
if (S_OK != Enumerator->Item(Var, &Item))
|
||||
return nullptr;
|
||||
|
||||
return std::unique_ptr<IPDBTable>(new DIATable(Item));
|
||||
}
|
||||
|
||||
std::unique_ptr<IPDBTable> DIAEnumTables::getNext() {
|
||||
CComPtr<IDiaTable> Item;
|
||||
ULONG CeltFetched = 0;
|
||||
if (S_OK != Enumerator->Next(1, &Item, &CeltFetched))
|
||||
return nullptr;
|
||||
|
||||
return std::unique_ptr<IPDBTable>(new DIATable(Item));
|
||||
}
|
||||
|
||||
void DIAEnumTables::reset() { Enumerator->Reset(); }
|
||||
|
||||
DIAEnumTables *DIAEnumTables::clone() const {
|
||||
CComPtr<IDiaEnumTables> EnumeratorClone;
|
||||
if (S_OK != Enumerator->Clone(&EnumeratorClone))
|
||||
return nullptr;
|
||||
return new DIAEnumTables(EnumeratorClone);
|
||||
}
|
Reference in New Issue
Block a user