1 //===- IPDBDataStream.h - base interface for child enumerator ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H
11 #define LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H
13 #include "llvm/ADT/Optional.h"
14 #include "llvm/ADT/SmallVector.h"
21 /// IPDBDataStream defines an interface used to represent a stream consisting
22 /// of a name and a series of records whose formats depend on the particular
24 class IPDBDataStream {
26 using RecordType = SmallVector<uint8_t, 32>;
28 virtual ~IPDBDataStream();
30 virtual uint32_t getRecordCount() const = 0;
31 virtual std::string getName() const = 0;
32 virtual Optional<RecordType> getItemAtIndex(uint32_t Index) const = 0;
33 virtual bool getNext(RecordType &Record) = 0;
34 virtual void reset() = 0;
35 virtual IPDBDataStream *clone() const = 0;
38 } // end namespace pdb
39 } // end namespace llvm
41 #endif // LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H