summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp10
-rw-r--r--llvm/tools/llvm-pdbdump/YamlTypeDumper.cpp4
-rw-r--r--llvm/tools/llvm-pdbdump/fuzzer/llvm-pdbdump-fuzzer.cpp11
-rw-r--r--llvm/tools/llvm-readobj/COFFDumper.cpp23
4 files changed, 24 insertions, 24 deletions
diff --git a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
index 1843a3c9e0f..a7ba98dd587 100644
--- a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
+++ b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
@@ -450,7 +450,7 @@ Error LLVMOutputStyle::dumpStreamBytes() {
auto Blocks = File.getMsfLayout().StreamMap[SI];
P.printList("Blocks", Blocks);
- StreamReader R(*S);
+ BinaryStreamReader R(*S);
ArrayRef<uint8_t> StreamData;
if (auto EC = R.readBytes(StreamData, S->getLength()))
return EC;
@@ -745,10 +745,10 @@ Error LLVMOutputStyle::dumpDbiStream() {
public:
RecordVisitor(ScopedPrinter &P, PDBFile &F) : P(P), F(F) {}
Error visitUnknown(ModuleSubstreamKind Kind,
- ReadableStreamRef Stream) override {
+ BinaryStreamRef Stream) override {
DictScope DD(P, "Unknown");
ArrayRef<uint8_t> Data;
- StreamReader R(Stream);
+ BinaryStreamReader R(Stream);
if (auto EC = R.readBytes(Data, R.bytesRemaining())) {
return make_error<RawError>(
raw_error_code::corrupt_file,
@@ -758,7 +758,7 @@ Error LLVMOutputStyle::dumpDbiStream() {
return Error::success();
}
Error
- visitFileChecksums(ReadableStreamRef Data,
+ visitFileChecksums(BinaryStreamRef Data,
const FileChecksumArray &Checksums) override {
DictScope DD(P, "FileChecksums");
for (const auto &C : Checksums) {
@@ -774,7 +774,7 @@ Error LLVMOutputStyle::dumpDbiStream() {
return Error::success();
}
- Error visitLines(ReadableStreamRef Data,
+ Error visitLines(BinaryStreamRef Data,
const LineSubstreamHeader *Header,
const LineInfoArray &Lines) override {
DictScope DD(P, "Lines");
diff --git a/llvm/tools/llvm-pdbdump/YamlTypeDumper.cpp b/llvm/tools/llvm-pdbdump/YamlTypeDumper.cpp
index 80bf9349b0c..50a488620ab 100644
--- a/llvm/tools/llvm-pdbdump/YamlTypeDumper.cpp
+++ b/llvm/tools/llvm-pdbdump/YamlTypeDumper.cpp
@@ -573,8 +573,8 @@ struct MappingContextTraits<pdb::yaml::PdbTpiFieldListRecord,
assert(IO.outputting());
codeview::TypeVisitorCallbackPipeline Pipeline;
- msf::ByteStream Data(Obj.Record.Data);
- msf::StreamReader FieldReader(Data);
+ BinaryByteStream Data(Obj.Record.Data);
+ BinaryStreamReader FieldReader(Data);
codeview::FieldListDeserializer Deserializer(FieldReader);
// For PDB to Yaml, deserialize into a high level record type, then dump
diff --git a/llvm/tools/llvm-pdbdump/fuzzer/llvm-pdbdump-fuzzer.cpp b/llvm/tools/llvm-pdbdump/fuzzer/llvm-pdbdump-fuzzer.cpp
index e818dda32fc..38eaf16c65b 100644
--- a/llvm/tools/llvm-pdbdump/fuzzer/llvm-pdbdump-fuzzer.cpp
+++ b/llvm/tools/llvm-pdbdump/fuzzer/llvm-pdbdump-fuzzer.cpp
@@ -13,7 +13,7 @@
///
//===----------------------------------------------------------------------===//
#include "llvm/ADT/STLExtras.h"
-#include "llvm/DebugInfo/CodeView/ByteStream.h"
+#include "llvm/DebugInfo/CodeView/BinaryByteStream.h"
#include "llvm/DebugInfo/CodeView/SymbolDumper.h"
#include "llvm/DebugInfo/CodeView/TypeDumper.h"
#include "llvm/DebugInfo/PDB/Raw/DbiStream.h"
@@ -28,14 +28,15 @@
using namespace llvm;
namespace {
-// We need a class which behaves like an immutable ByteStream, but whose data
+// We need a class which behaves like an immutable BinaryByteStream, but whose
+// data
// is backed by an llvm::MemoryBuffer. It also needs to own the underlying
// MemoryBuffer, so this simple adapter is a good way to achieve that.
-class InputByteStream : public codeview::ByteStream<false> {
+class InputByteStream : public codeview::BinaryByteStream<false> {
public:
explicit InputByteStream(std::unique_ptr<MemoryBuffer> Buffer)
- : ByteStream(ArrayRef<uint8_t>(Buffer->getBuffer().bytes_begin(),
- Buffer->getBuffer().bytes_end())),
+ : BinaryByteStream(ArrayRef<uint8_t>(Buffer->getBuffer().bytes_begin(),
+ Buffer->getBuffer().bytes_end())),
MemBuffer(std::move(Buffer)) {}
std::unique_ptr<MemoryBuffer> MemBuffer;
diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp
index 329768fcaa6..aef9ea530b6 100644
--- a/llvm/tools/llvm-readobj/COFFDumper.cpp
+++ b/llvm/tools/llvm-readobj/COFFDumper.cpp
@@ -56,7 +56,6 @@
using namespace llvm;
using namespace llvm::object;
using namespace llvm::codeview;
-using namespace llvm::msf;
using namespace llvm::support;
using namespace llvm::Win64EH;
@@ -155,7 +154,7 @@ public:
Sec = Obj->getCOFFSection(SR);
}
- uint32_t getRecordOffset(msf::StreamReader Reader) override {
+ uint32_t getRecordOffset(BinaryStreamReader Reader) override {
ArrayRef<uint8_t> Data;
if (auto EC = Reader.readLongestContiguousChunk(Data)) {
llvm::consumeError(std::move(EC));
@@ -841,8 +840,8 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName,
}
case ModuleSubstreamKind::FrameData: {
// First four bytes is a relocation against the function.
- msf::ByteStream S(Contents);
- msf::StreamReader SR(S);
+ BinaryByteStream S(Contents);
+ BinaryStreamReader SR(S);
const uint32_t *CodePtr;
error(SR.readObject(CodePtr));
StringRef LinkageName;
@@ -966,9 +965,9 @@ void COFFDumper::printCodeViewSymbolsSubsection(StringRef Subsection,
CVSymbolDumper CVSD(W, TypeDB, std::move(CODD),
opts::CodeViewSubsectionBytes);
- ByteStream Stream(BinaryData);
+ BinaryByteStream Stream(BinaryData);
CVSymbolArray Symbols;
- StreamReader Reader(Stream);
+ BinaryStreamReader Reader(Stream);
if (auto EC = Reader.readArray(Symbols, Reader.getLength())) {
consumeError(std::move(EC));
W.flush();
@@ -983,8 +982,8 @@ void COFFDumper::printCodeViewSymbolsSubsection(StringRef Subsection,
}
void COFFDumper::printCodeViewFileChecksums(StringRef Subsection) {
- msf::ByteStream S(Subsection);
- msf::StreamReader SR(S);
+ BinaryByteStream S(Subsection);
+ BinaryStreamReader SR(S);
while (!SR.empty()) {
DictScope S(W, "FileChecksum");
const FileChecksum *FC;
@@ -1012,8 +1011,8 @@ void COFFDumper::printCodeViewFileChecksums(StringRef Subsection) {
}
void COFFDumper::printCodeViewInlineeLines(StringRef Subsection) {
- msf::ByteStream S(Subsection);
- msf::StreamReader SR(S);
+ BinaryByteStream S(Subsection);
+ BinaryStreamReader SR(S);
uint32_t Signature;
error(SR.readInteger(Signature, llvm::support::little));
bool HasExtraFiles = Signature == unsigned(InlineeLinesSignature::ExtraFiles);
@@ -1078,9 +1077,9 @@ void COFFDumper::mergeCodeViewTypes(TypeTableBuilder &CVTypes) {
error(object_error::parse_failed);
ArrayRef<uint8_t> Bytes(reinterpret_cast<const uint8_t *>(Data.data()),
Data.size());
- ByteStream Stream(Bytes);
+ BinaryByteStream Stream(Bytes);
CVTypeArray Types;
- StreamReader Reader(Stream);
+ BinaryStreamReader Reader(Stream);
if (auto EC = Reader.readArray(Types, Reader.getLength())) {
consumeError(std::move(EC));
W.flush();
OpenPOWER on IntegriCloud