diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -190,7 +190,6 @@ // the end of the prologue. static llvm::Expected parseV5EntryFormat(const DWARFDataExtractor &DebugLineData, uint64_t *OffsetPtr, - uint64_t EndPrologueOffset, DWARFDebugLine::ContentTypeTracker *ContentTypes) { ContentDescriptors Descriptors; int FormatCount = DebugLineData.getU8(OffsetPtr); @@ -216,15 +215,14 @@ static Error parseV5DirFileTables(const DWARFDataExtractor &DebugLineData, - uint64_t *OffsetPtr, uint64_t EndPrologueOffset, - const dwarf::FormParams &FormParams, + uint64_t *OffsetPtr, const dwarf::FormParams &FormParams, const DWARFContext &Ctx, const DWARFUnit *U, DWARFDebugLine::ContentTypeTracker &ContentTypes, std::vector &IncludeDirectories, std::vector &FileNames) { // Get the directory entry description. llvm::Expected DirDescriptors = - parseV5EntryFormat(DebugLineData, OffsetPtr, EndPrologueOffset, nullptr); + parseV5EntryFormat(DebugLineData, OffsetPtr, nullptr); if (!DirDescriptors) return DirDescriptors.takeError(); @@ -251,8 +249,8 @@ } // Get the file entry description. - llvm::Expected FileDescriptors = parseV5EntryFormat( - DebugLineData, OffsetPtr, EndPrologueOffset, &ContentTypes); + llvm::Expected FileDescriptors = + parseV5EntryFormat(DebugLineData, OffsetPtr, &ContentTypes); if (!FileDescriptors) return FileDescriptors.takeError(); @@ -354,9 +352,9 @@ } if (getVersion() >= 5) { - if (Error e = parseV5DirFileTables( - DebugLineData, OffsetPtr, EndPrologueOffset, FormParams, Ctx, U, - ContentTypes, IncludeDirectories, FileNames)) { + if (Error E = + parseV5DirFileTables(DebugLineData, OffsetPtr, FormParams, Ctx, U, + ContentTypes, IncludeDirectories, FileNames)) { RecoverableErrorCallback(joinErrors( createStringError( errc::invalid_argument, @@ -364,7 +362,7 @@ " found an invalid directory or file table description at" " 0x%8.8" PRIx64, PrologueOffset, *OffsetPtr), - std::move(e))); + std::move(E))); // Skip to the end of the prologue, since the chances are that the parser // did not read the whole table. This prevents the length check below from // executing.