diff options
Diffstat (limited to 'llvm/tools/llvm-readobj/COFFDumper.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/COFFDumper.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp index aef9ea530b6..6de64403214 100644 --- a/llvm/tools/llvm-readobj/COFFDumper.cpp +++ b/llvm/tools/llvm-readobj/COFFDumper.cpp @@ -840,7 +840,7 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName, } case ModuleSubstreamKind::FrameData: { // First four bytes is a relocation against the function. - BinaryByteStream S(Contents); + BinaryByteStream S(Contents, llvm::support::little); BinaryStreamReader SR(S); const uint32_t *CodePtr; error(SR.readObject(CodePtr)); @@ -965,7 +965,7 @@ void COFFDumper::printCodeViewSymbolsSubsection(StringRef Subsection, CVSymbolDumper CVSD(W, TypeDB, std::move(CODD), opts::CodeViewSubsectionBytes); - BinaryByteStream Stream(BinaryData); + BinaryByteStream Stream(BinaryData, llvm::support::little); CVSymbolArray Symbols; BinaryStreamReader Reader(Stream); if (auto EC = Reader.readArray(Symbols, Reader.getLength())) { @@ -982,7 +982,7 @@ void COFFDumper::printCodeViewSymbolsSubsection(StringRef Subsection, } void COFFDumper::printCodeViewFileChecksums(StringRef Subsection) { - BinaryByteStream S(Subsection); + BinaryByteStream S(Subsection, llvm::support::little); BinaryStreamReader SR(S); while (!SR.empty()) { DictScope S(W, "FileChecksum"); @@ -1011,10 +1011,10 @@ void COFFDumper::printCodeViewFileChecksums(StringRef Subsection) { } void COFFDumper::printCodeViewInlineeLines(StringRef Subsection) { - BinaryByteStream S(Subsection); + BinaryByteStream S(Subsection, llvm::support::little); BinaryStreamReader SR(S); uint32_t Signature; - error(SR.readInteger(Signature, llvm::support::little)); + error(SR.readInteger(Signature)); bool HasExtraFiles = Signature == unsigned(InlineeLinesSignature::ExtraFiles); while (!SR.empty()) { @@ -1027,12 +1027,12 @@ void COFFDumper::printCodeViewInlineeLines(StringRef Subsection) { if (HasExtraFiles) { uint32_t ExtraFileCount; - error(SR.readInteger(ExtraFileCount, llvm::support::little)); + error(SR.readInteger(ExtraFileCount)); W.printNumber("ExtraFileCount", ExtraFileCount); ListScope ExtraFiles(W, "ExtraFiles"); for (unsigned I = 0; I < ExtraFileCount; ++I) { uint32_t FileID; - error(SR.readInteger(FileID, llvm::support::little)); + error(SR.readInteger(FileID)); printFileNameForOffset("FileID", FileID); } } @@ -1077,7 +1077,7 @@ void COFFDumper::mergeCodeViewTypes(TypeTableBuilder &CVTypes) { error(object_error::parse_failed); ArrayRef<uint8_t> Bytes(reinterpret_cast<const uint8_t *>(Data.data()), Data.size()); - BinaryByteStream Stream(Bytes); + BinaryByteStream Stream(Bytes, llvm::support::little); CVTypeArray Types; BinaryStreamReader Reader(Stream); if (auto EC = Reader.readArray(Types, Reader.getLength())) { |