diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp index 9ef0a49..2209477 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp @@ -138,11 +138,14 @@ PDBFile::getStreamBlockList(uint32_t StreamIndex) const { return Array; } -StringRef PDBFile::getBlockData(uint32_t BlockIndex, uint32_t NumBytes) const { +ArrayRef<uint8_t> PDBFile::getBlockData(uint32_t BlockIndex, + uint32_t NumBytes) const { uint64_t StreamBlockOffset = blockToOffset(BlockIndex, getBlockSize()); - return StringRef(Context->Buffer->getBufferStart() + StreamBlockOffset, - NumBytes); + return ArrayRef<uint8_t>( + reinterpret_cast<const uint8_t *>(Context->Buffer->getBufferStart()) + + StreamBlockOffset, + NumBytes); } Error PDBFile::parseFileHeaders() { |