LLVM 20.0.0git
DIAEnumFrameData.cpp
Go to the documentation of this file.
1//==- DIAEnumFrameData.cpp ---------------------------------------*- 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
12
13using namespace llvm::pdb;
14
15DIAEnumFrameData::DIAEnumFrameData(CComPtr<IDiaEnumFrameData> DiaEnumerator)
16 : Enumerator(DiaEnumerator) {}
17
19 LONG Count = 0;
20 return (S_OK == Enumerator->get_Count(&Count)) ? Count : 0;
21}
22
23std::unique_ptr<IPDBFrameData>
25 CComPtr<IDiaFrameData> Item;
26 if (S_OK != Enumerator->Item(Index, &Item))
27 return nullptr;
28
29 return std::unique_ptr<IPDBFrameData>(new DIAFrameData(Item));
30}
31
32std::unique_ptr<IPDBFrameData> DIAEnumFrameData::getNext() {
33 CComPtr<IDiaFrameData> Item;
34 ULONG NumFetched = 0;
35 if (S_OK != Enumerator->Next(1, &Item, &NumFetched))
36 return nullptr;
37
38 return std::unique_ptr<IPDBFrameData>(new DIAFrameData(Item));
39}
40
41void DIAEnumFrameData::reset() { Enumerator->Reset(); }
ChildTypePtr getNext() override
ChildTypePtr getChildAtIndex(uint32_t Index) const override
uint32_t getChildCount() const override
DIAEnumFrameData(CComPtr< IDiaEnumFrameData > DiaEnumerator)