diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp b/llvm/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp index ceeca10c5c5..91cbf4bca07 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NamedStreamMap.cpp @@ -21,12 +21,11 @@ #include <cstdint> using namespace llvm; -using namespace llvm::msf; using namespace llvm::pdb; NamedStreamMap::NamedStreamMap() = default; -Error NamedStreamMap::load(StreamReader &Stream) { +Error NamedStreamMap::load(BinaryStreamReader &Stream) { Mapping.clear(); FinalizedHashTable.clear(); FinalizedInfo.reset(); @@ -37,7 +36,7 @@ Error NamedStreamMap::load(StreamReader &Stream) { make_error<RawError>(raw_error_code::corrupt_file, "Expected string buffer size")); - msf::ReadableStreamRef StringsBuffer; + BinaryStreamRef StringsBuffer; if (auto EC = Stream.readStreamRef(StringsBuffer, StringBufferSize)) return EC; @@ -51,11 +50,11 @@ Error NamedStreamMap::load(StreamReader &Stream) { std::tie(NameOffset, NameIndex) = Entry; // Compute the offset of the start of the string relative to the stream. - msf::StreamReader NameReader(StringsBuffer); + BinaryStreamReader NameReader(StringsBuffer); NameReader.setOffset(NameOffset); // Pump out our c-string from the stream. StringRef Str; - if (auto EC = NameReader.readZeroString(Str)) + if (auto EC = NameReader.readCString(Str)) return joinErrors(std::move(EC), make_error<RawError>(raw_error_code::corrupt_file, "Expected name map name")); @@ -67,7 +66,7 @@ Error NamedStreamMap::load(StreamReader &Stream) { return Error::success(); } -Error NamedStreamMap::commit(msf::StreamWriter &Writer) const { +Error NamedStreamMap::commit(BinaryStreamWriter &Writer) const { assert(FinalizedInfo.hasValue()); // The first field is the number of bytes of string data. @@ -77,7 +76,7 @@ Error NamedStreamMap::commit(msf::StreamWriter &Writer) const { // Now all of the string data itself. for (const auto &Item : Mapping) { - if (auto EC = Writer.writeZeroString(Item.getKey())) + if (auto EC = Writer.writeCString(Item.getKey())) return EC; } |