summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/CodeView
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView')
-rw-r--r--llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp4
-rw-r--r--llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp6
-rw-r--r--llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp9
-rw-r--r--llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp9
-rw-r--r--llvm/lib/DebugInfo/CodeView/TypeTableCollection.cpp3
5 files changed, 15 insertions, 16 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp b/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
index 1a85a339f8c..c31b8d1c96d 100644
--- a/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
+++ b/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
@@ -25,8 +25,8 @@ struct FileChecksumEntryHeader {
// Checksum bytes follow.
};
-Error llvm::VarStreamArrayExtractor<FileChecksumEntry>::extract(
- BinaryStreamRef Stream, uint32_t &Len, FileChecksumEntry &Item) {
+Error llvm::VarStreamArrayExtractor<FileChecksumEntry>::
+operator()(BinaryStreamRef Stream, uint32_t &Len, FileChecksumEntry &Item) {
BinaryStreamReader Reader(Stream);
const FileChecksumEntryHeader *Header;
diff --git a/llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp b/llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp
index e0ceefcd5fa..2c4a0b77934 100644
--- a/llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp
+++ b/llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp
@@ -16,9 +16,9 @@ using namespace llvm;
using namespace llvm::codeview;
namespace llvm {
-Error VarStreamArrayExtractor<CrossModuleImportItem>::extract(
- BinaryStreamRef Stream, uint32_t &Len,
- codeview::CrossModuleImportItem &Item) {
+Error VarStreamArrayExtractor<CrossModuleImportItem>::
+operator()(BinaryStreamRef Stream, uint32_t &Len,
+ codeview::CrossModuleImportItem &Item) {
BinaryStreamReader Reader(Stream);
if (Reader.bytesRemaining() < sizeof(CrossModuleImport))
return make_error<CodeViewError>(
diff --git a/llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp b/llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp
index 520a0ee4454..e7719d05dbd 100644
--- a/llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp
+++ b/llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp
@@ -17,9 +17,8 @@
using namespace llvm;
using namespace llvm::codeview;
-Error VarStreamArrayExtractor<InlineeSourceLine>::extract(
- BinaryStreamRef Stream, uint32_t &Len, InlineeSourceLine &Item,
- bool HasExtraFiles) {
+Error VarStreamArrayExtractor<InlineeSourceLine>::
+operator()(BinaryStreamRef Stream, uint32_t &Len, InlineeSourceLine &Item) {
BinaryStreamReader Reader(Stream);
if (auto EC = Reader.readObject(Item.Header))
@@ -44,8 +43,8 @@ Error DebugInlineeLinesSubsectionRef::initialize(BinaryStreamReader Reader) {
if (auto EC = Reader.readEnum(Signature))
return EC;
- if (auto EC =
- Reader.readArray(Lines, Reader.bytesRemaining(), hasExtraFiles()))
+ Lines.getExtractor().HasExtraFiles = hasExtraFiles();
+ if (auto EC = Reader.readArray(Lines, Reader.bytesRemaining()))
return EC;
assert(Reader.bytesRemaining() == 0);
diff --git a/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp b/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
index 33a8f78beb3..fbcad61d60a 100644
--- a/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
+++ b/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
@@ -17,9 +17,8 @@
using namespace llvm;
using namespace llvm::codeview;
-Error LineColumnExtractor::extract(BinaryStreamRef Stream, uint32_t &Len,
- LineColumnEntry &Item,
- const LineFragmentHeader *Header) {
+Error LineColumnExtractor::operator()(BinaryStreamRef Stream, uint32_t &Len,
+ LineColumnEntry &Item) {
using namespace codeview;
const LineBlockFragmentHeader *BlockHeader;
BinaryStreamReader Reader(Stream);
@@ -56,8 +55,8 @@ Error DebugLinesSubsectionRef::initialize(BinaryStreamReader Reader) {
if (auto EC = Reader.readObject(Header))
return EC;
- if (auto EC =
- Reader.readArray(LinesAndColumns, Reader.bytesRemaining(), Header))
+ LinesAndColumns.getExtractor().Header = Header;
+ if (auto EC = Reader.readArray(LinesAndColumns, Reader.bytesRemaining()))
return EC;
return Error::success();
diff --git a/llvm/lib/DebugInfo/CodeView/TypeTableCollection.cpp b/llvm/lib/DebugInfo/CodeView/TypeTableCollection.cpp
index 699694fde92..8d974d522f2 100644
--- a/llvm/lib/DebugInfo/CodeView/TypeTableCollection.cpp
+++ b/llvm/lib/DebugInfo/CodeView/TypeTableCollection.cpp
@@ -51,7 +51,8 @@ void TypeTableCollection::ensureTypeExists(TypeIndex Index) {
CVType Type;
uint32_t Len;
- error(VarStreamArrayExtractor<CVType>::extract(Bytes, Len, Type));
+ VarStreamArrayExtractor<CVType> Extract;
+ error(Extract(Bytes, Len, Type));
TypeDatabaseVisitor DBV(Database);
error(codeview::visitTypeRecord(Type, Index, DBV));
OpenPOWER on IntegriCloud