aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-06-07 20:38:37 +0000
committerZachary Turner <zturner@google.com>2016-06-07 20:38:37 +0000
commite6fee88ce14865f5863ca711504936db4b011d34 (patch)
treef72e51178ef170144f1873f8af5ceb2c21713460 /llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
parent0ad60a90c799051ec7dafce58f5a92e584d791df (diff)
downloadllvm-e6fee88ce14865f5863ca711504936db4b011d34.zip
llvm-e6fee88ce14865f5863ca711504936db4b011d34.tar.gz
llvm-e6fee88ce14865f5863ca711504936db4b011d34.tar.bz2
[pdb] Convert StringRefs to ArrayRef<uint8_t>s.
llvm-svn: 272058
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp9
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() {