[llvm] r307987 - Remove set but not used variables from the debug info verifier code.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 18:40:47 PDT 2017


Author: echristo
Date: Thu Jul 13 18:40:47 2017
New Revision: 307987

URL: http://llvm.org/viewvc/llvm-project?rev=307987&view=rev
Log:
Remove set but not used variables from the debug info verifier code.

Modified:
    llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp

Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp?rev=307987&r1=307986&r2=307987&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFVerifier.cpp Thu Jul 13 18:40:47 2017
@@ -31,8 +31,6 @@ bool DWARFVerifier::verifyUnitHeader(con
   uint8_t AddrSize = 0, UnitType = 0;
   uint16_t Version;
   bool Success = true;
-  uint32_t HeaderSize =
-      11; // means that we have only compile units in .debug_info
 
   bool ValidLength = false;
   bool ValidVersion = false;
@@ -56,8 +54,6 @@ bool DWARFVerifier::verifyUnitHeader(con
     AddrSize = DebugInfoData.getU8(Offset);
     AbbrOffset = DebugInfoData.getU32(Offset);
     ValidType = DWARFUnit::isValidUnitType(UnitType);
-    if (ValidType)
-      HeaderSize = DWARFUnit::getDWARF5HeaderSize(UnitType);
   } else {
     AbbrOffset = DebugInfoData.getU32(Offset);
     AddrSize = DebugInfoData.getU8(Offset);
@@ -95,12 +91,11 @@ bool DWARFVerifier::handleDebugInfoUnitH
 
   DWARFDataExtractor DebugInfoData(DCtx.getInfoSection(), DCtx.isLittleEndian(),
                                    0);
-  uint32_t OffsetStart, Offset = 0, UnitIdx = 0;
+  uint32_t Offset = 0, UnitIdx = 0;
   bool isUnitDWARF64 = false;
   bool Success = true;
   bool hasDIE = DebugInfoData.isValidOffset(Offset);
   while (hasDIE) {
-    OffsetStart = Offset;
     if (!verifyUnitHeader(DebugInfoData, &Offset, UnitIdx, isUnitDWARF64)) {
       Success = false;
       if (isUnitDWARF64)




More information about the llvm-commits mailing list