[llvm] r273809 - Fixed build failure (due to unused variable error) in r273807.

Amjad Aboud via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 26 05:43:34 PDT 2016


Author: aaboud
Date: Sun Jun 26 07:43:33 2016
New Revision: 273809

URL: http://llvm.org/viewvc/llvm-project?rev=273809&view=rev
Log:
Fixed build failure (due to unused variable error) in r273807.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp?rev=273809&r1=273808&r2=273809&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp Sun Jun 26 07:43:33 2016
@@ -911,7 +911,6 @@ TypeIndex CodeViewDebug::lowerTypeArray(
   TypeIndex IndexType = Asm->MAI->getPointerSize() == 8
                             ? TypeIndex(SimpleTypeKind::UInt64Quad)
                             : TypeIndex(SimpleTypeKind::UInt32Long);
-  uint64_t Size = Ty->getSizeInBits() / 8;
   assert(ElementTypeRef.resolve());
   uint64_t ElementSize = ElementTypeRef.resolve()->getSizeInBits() / 8;
 
@@ -957,8 +956,7 @@ TypeIndex CodeViewDebug::lowerTypeArray(
         ArrayRecord(ElementTypeIndex, IndexType, ElementSize, Name));
   }
 
-  (void)UndefinedSubrange;
-  assert(UndefinedSubrange || ElementSize == Size);
+  assert(UndefinedSubrange || ElementSize == (Ty->getSizeInBits() / 8));
 
   return ElementTypeIndex;
 }




More information about the llvm-commits mailing list