• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- IPDBFile.h - Abstract base class for a PDB file ----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_PDB_RAW_IPDBFILE_H
11 #define LLVM_DEBUGINFO_PDB_RAW_IPDBFILE_H
12 
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/DebugInfo/CodeView/StreamArray.h"
16 #include "llvm/Support/Endian.h"
17 #include "llvm/Support/Error.h"
18 
19 #include <stdint.h>
20 
21 namespace llvm {
22 namespace pdb {
23 
24 class IPDBFile {
25 public:
~IPDBFile()26   virtual ~IPDBFile() {}
27 
28   virtual uint32_t getBlockSize() const = 0;
29   virtual uint32_t getBlockCount() const = 0;
30 
31   virtual uint32_t getNumStreams() const = 0;
32   virtual uint32_t getStreamByteSize(uint32_t StreamIndex) const = 0;
33   virtual ArrayRef<support::ulittle32_t>
34   getStreamBlockList(uint32_t StreamIndex) const = 0;
35 
36   virtual Expected<ArrayRef<uint8_t>> getBlockData(uint32_t BlockIndex,
37                                                    uint32_t NumBytes) const = 0;
38   virtual Error setBlockData(uint32_t BlockIndex, uint32_t Offset,
39                              ArrayRef<uint8_t> Data) const = 0;
40 };
41 }
42 }
43 
44 #endif // LLVM_DEBUGINFO_PDB_RAW_IPDBFILE_H
45