[InstCombine] Signed saturation patterns
[llvm-core.git] / include / llvm / DebugInfo / PDB / IPDBDataStream.h
blob4d0589a8791599cde72ca803c62214a57961737d
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 //===----------------------------------------------------------------------===//
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"
14 #include <cstdint>
15 #include <string>
17 namespace llvm {
18 namespace pdb {
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>;
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