Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 14 | pmbaty | 1 | //===- IPDBDataStream.h - base interface for child enumerator ---*- 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 | |||
| 9 | #ifndef LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H |
||
| 10 | #define LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H |
||
| 11 | |||
| 12 | #include "llvm/ADT/SmallVector.h" |
||
| 13 | #include <cstdint> |
||
| 14 | #include <optional> |
||
| 15 | #include <string> |
||
| 16 | |||
| 17 | namespace llvm { |
||
| 18 | namespace pdb { |
||
| 19 | |||
| 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 |
||
| 22 | /// stream type. |
||
| 23 | class IPDBDataStream { |
||
| 24 | public: |
||
| 25 | using RecordType = SmallVector<uint8_t, 32>; |
||
| 26 | |||
| 27 | virtual ~IPDBDataStream(); |
||
| 28 | |||
| 29 | virtual uint32_t getRecordCount() const = 0; |
||
| 30 | virtual std::string getName() const = 0; |
||
| 31 | virtual std::optional<RecordType> getItemAtIndex(uint32_t Index) const = 0; |
||
| 32 | virtual bool getNext(RecordType &Record) = 0; |
||
| 33 | virtual void reset() = 0; |
||
| 34 | }; |
||
| 35 | |||
| 36 | } // end namespace pdb |
||
| 37 | } // end namespace llvm |
||
| 38 | |||
| 39 | #endif // LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H |