summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp b/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp
index 51ec66a1b9d..3638380eb22 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp
@@ -10,9 +10,11 @@
#include "llvm/DebugInfo/PDB/Raw/NameMap.h"
#include "llvm/ADT/SparseBitVector.h"
#include "llvm/DebugInfo/CodeView/StreamReader.h"
+#include "llvm/DebugInfo/CodeView/StreamWriter.h"
#include "llvm/DebugInfo/PDB/Raw/RawError.h"
using namespace llvm;
+using namespace llvm::codeview;
using namespace llvm::pdb;
NameMap::NameMap() {}
@@ -143,6 +145,24 @@ Error NameMap::load(codeview::StreamReader &Stream) {
return Error::success();
}
+Error NameMap::commit(codeview::StreamWriter &Writer) {
+ if (auto EC = Writer.writeInteger(0U)) // Number of bytes in table
+ return EC;
+
+ if (auto EC = Writer.writeInteger(0U)) // Hash Size
+ return EC;
+
+ if (auto EC = Writer.writeInteger(0U)) // Max Number of Strings
+ return EC;
+
+ if (auto EC = Writer.writeInteger(0U)) // Num Present Words
+ return EC;
+
+ if (auto EC = Writer.writeInteger(0U)) // Num Deleted Words
+ return EC;
+ return Error::success();
+}
+
iterator_range<StringMapConstIterator<uint32_t>> NameMap::entries() const {
return llvm::make_range<StringMapConstIterator<uint32_t>>(Mapping.begin(),
Mapping.end());
OpenPOWER on IntegriCloud