• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- DirectoryStreamData.h ---------------------------------- *- 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_DIRECTORYSTREAMDATA_H
11 #define LLVM_DEBUGINFO_PDB_RAW_DIRECTORYSTREAMDATA_H
12 
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/DebugInfo/PDB/Raw/IPDBStreamData.h"
15 #include "llvm/DebugInfo/PDB/Raw/PDBFile.h"
16 #include "llvm/Support/Endian.h"
17 
18 namespace llvm {
19 namespace pdb {
20 class IPDBFile;
21 
22 class DirectoryStreamData : public IPDBStreamData {
23 public:
DirectoryStreamData(const PDBFile & File)24   DirectoryStreamData(const PDBFile &File) : File(File) {}
25 
getLength()26   virtual uint32_t getLength() { return File.getNumDirectoryBytes(); }
getStreamBlocks()27   virtual llvm::ArrayRef<llvm::support::ulittle32_t> getStreamBlocks() {
28     return File.getDirectoryBlockArray();
29   }
30 
31 private:
32   const PDBFile &File;
33 };
34 }
35 }
36 
37 #endif
38