llvm-project/llvm/lib/DebugInfo/Msf/IndexedStreamData.cpp
Zachary Turner bac69d33d0 [msf] Create LLVMDebugInfoMsf
This provides a better layering of responsibilities among different
aspects of PDB writing code.  Some of the MSF related code was
contained in CodeView, and some was in PDB prior to this.  Further,
we were often saying PDB when we meant MSF, and the two are
actually independent of each other since in theory you can have
other types of data besides PDB data in an MSF.  So, this patch
separates the MSF specific code into its own library, with no
dependencies on anything else, and DebugInfoCodeView and
DebugInfoPDB take dependencies on DebugInfoMsf.

llvm-svn: 276458
2016-07-22 19:56:05 +00:00

26 lines
812 B
C++

//===- IndexedStreamData.cpp - Standard PDB Stream Data ---------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/Msf/IndexedStreamData.h"
#include "llvm/DebugInfo/Msf/IMsfFile.h"
using namespace llvm;
using namespace llvm::msf;
IndexedStreamData::IndexedStreamData(uint32_t StreamIdx, const IMsfFile &File)
: StreamIdx(StreamIdx), File(File) {}
uint32_t IndexedStreamData::getLength() {
return File.getStreamByteSize(StreamIdx);
}
ArrayRef<support::ulittle32_t> IndexedStreamData::getStreamBlocks() {
return File.getStreamBlockList(StreamIdx);
}