1 //===- IPDBDataStream.h - base interface for child enumerator ---*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H
10 #define LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H
12 #include "llvm/ADT/Optional.h"
13 #include "llvm/ADT/SmallVector.h"
20 /// IPDBDataStream defines an interface used to represent a stream consisting
21 /// of a name and a series of records whose formats depend on the particular
23 class IPDBDataStream
{
25 using RecordType
= SmallVector
<uint8_t, 32>;
27 virtual ~IPDBDataStream();
29 virtual uint32_t getRecordCount() const = 0;
30 virtual std::string
getName() const = 0;
31 virtual Optional
<RecordType
> getItemAtIndex(uint32_t Index
) const = 0;
32 virtual bool getNext(RecordType
&Record
) = 0;
33 virtual void reset() = 0;
36 } // end namespace pdb
37 } // end namespace llvm
39 #endif // LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H