aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-06-14 20:48:36 +0000
committerZachary Turner <zturner@google.com>2016-06-14 20:48:36 +0000
commit1dc9fd3c4a260883b1559f7b92ad9156ecc2418c (patch)
tree8d5d34a33d2e7c87869808cabd5f21aa76cfba6a /llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
parent4b73cc88bf6bbb90b0bb5d6642c1fe91ae7abbff (diff)
downloadllvm-1dc9fd3c4a260883b1559f7b92ad9156ecc2418c.zip
llvm-1dc9fd3c4a260883b1559f7b92ad9156ecc2418c.tar.gz
llvm-1dc9fd3c4a260883b1559f7b92ad9156ecc2418c.tar.bz2
Resubmit "[pdb] Actually write a PDB to disk from YAML.""
Reviewed By: ruiu Differential Revision: http://reviews.llvm.org/D21220 llvm-svn: 272708
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
index 6186a47..a5c383e 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
@@ -23,6 +23,7 @@
#include "llvm/DebugInfo/PDB/Raw/SymbolStream.h"
#include "llvm/DebugInfo/PDB/Raw/TpiStream.h"
#include "llvm/Support/Endian.h"
+#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/MemoryBuffer.h"
using namespace llvm;
@@ -69,6 +70,8 @@ PDBFile::getStreamBlockList(uint32_t StreamIndex) const {
return StreamMap[StreamIndex];
}
+size_t PDBFile::getFileSize() const { return Buffer->getLength(); }
+
ArrayRef<uint8_t> PDBFile::getBlockData(uint32_t BlockIndex,
uint32_t NumBytes) const {
uint64_t StreamBlockOffset = blockToOffset(BlockIndex, getBlockSize());
@@ -317,3 +320,15 @@ Expected<NameHashTable &> PDBFile::getStringTable() {
}
return *StringTable;
}
+
+void PDBFile::setSuperBlock(const SuperBlock *Block) { SB = Block; }
+
+void PDBFile::setStreamSizes(ArrayRef<support::ulittle32_t> Sizes) {
+ StreamSizes = Sizes;
+}
+
+void PDBFile::setStreamMap(ArrayRef<ArrayRef<support::ulittle32_t>> Blocks) {
+ StreamMap = Blocks;
+}
+
+void PDBFile::commit() {} \ No newline at end of file