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.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp b/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp
index e17600986c9..70b810f1522 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/NameMap.cpp
@@ -145,60 +145,6 @@ Error NameMap::load(StreamReader &Stream) {
return Error::success();
}
-Error NameMap::commit(StreamWriter &Writer) {
- // The first field is the number of bytes of string data. So add
- // up the length of all strings plus a null terminator for each
- // one.
- uint32_t NumBytes = 0;
- for (auto B = Mapping.begin(), E = Mapping.end(); B != E; ++B) {
- NumBytes += B->getKeyLength() + 1;
- }
-
- if (auto EC = Writer.writeInteger(NumBytes)) // Number of bytes of string data
- return EC;
- // Now all of the string data itself.
- for (auto B = Mapping.begin(), E = Mapping.end(); B != E; ++B) {
- if (auto EC = Writer.writeZeroString(B->getKey()))
- return EC;
- }
-
- if (auto EC = Writer.writeInteger(Mapping.size())) // Hash Size
- return EC;
-
- if (auto EC = Writer.writeInteger(Mapping.size())) // Max Number of Strings
- return EC;
-
- if (auto EC = Writer.writeInteger(Mapping.size())) // Num Present Words
- return EC;
-
- // For each entry in the mapping, write a bit mask which represents a bucket
- // to store it in. We don't use this, so the value we write isn't important
- // to us, it just has to be there.
- for (auto B = Mapping.begin(), E = Mapping.end(); B != E; ++B) {
- if (auto EC = Writer.writeInteger(1U))
- return EC;
- }
-
- if (auto EC = Writer.writeInteger(0U)) // Num Deleted Words
- return EC;
-
- // Mappings of each word.
- uint32_t OffsetSoFar = 0;
- for (auto B = Mapping.begin(), E = Mapping.end(); B != E; ++B) {
- // This is a list of key value pairs where the key is the offset into the
- // strings buffer, and the value is a stream number. Write each pair.
- if (auto EC = Writer.writeInteger(OffsetSoFar))
- return EC;
-
- if (auto EC = Writer.writeInteger(B->second))
- return EC;
-
- OffsetSoFar += B->getKeyLength() + 1;
- }
-
- 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