1 //===- IndexedStreamData.cpp - Standard PDB Stream Data ---------*- 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 #include "llvm/DebugInfo/PDB/Raw/IndexedStreamData.h"
11 #include "llvm/DebugInfo/PDB/Raw/IPDBFile.h"
12 
13 using namespace llvm;
14 using namespace llvm::pdb;
15 
IndexedStreamData(uint32_t StreamIdx,const IPDBFile & File)16 IndexedStreamData::IndexedStreamData(uint32_t StreamIdx, const IPDBFile &File)
17     : StreamIdx(StreamIdx), File(File) {}
18 
getLength()19 uint32_t IndexedStreamData::getLength() {
20   return File.getStreamByteSize(StreamIdx);
21 }
22 
getStreamBlocks()23 ArrayRef<support::ulittle32_t> IndexedStreamData::getStreamBlocks() {
24   return File.getStreamBlockList(StreamIdx);
25 }
26