]> granicus.if.org Git - llvm/commitdiff
Fixed build failure (due to unused variable error) in r273807.
authorAmjad Aboud <amjad.aboud@intel.com>
Sun, 26 Jun 2016 12:43:33 +0000 (12:43 +0000)
committerAmjad Aboud <amjad.aboud@intel.com>
Sun, 26 Jun 2016 12:43:33 +0000 (12:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273809 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

index 4e463a2ec5c02c0096c778fa4883072e2ccc6985..cb834f577b6cf91c07bec2f193d4c54f3b27444a 100644 (file)
@@ -911,7 +911,6 @@ TypeIndex CodeViewDebug::lowerTypeArray(const DICompositeType *Ty) {
   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(const DICompositeType *Ty) {
         ArrayRecord(ElementTypeIndex, IndexType, ElementSize, Name));
   }
 
-  (void)UndefinedSubrange;
-  assert(UndefinedSubrange || ElementSize == Size);
+  assert(UndefinedSubrange || ElementSize == (Ty->getSizeInBits() / 8));
 
   return ElementTypeIndex;
 }