]> granicus.if.org Git - llvm/commitdiff
Prevent unused warning in non-assert builds (introduced in r310014).
authorDaniel Jasper <djasper@google.com>
Fri, 4 Aug 2017 05:05:29 +0000 (05:05 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 4 Aug 2017 05:05:29 +0000 (05:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310022 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/DIBuilder.cpp

index f4702b377f9d5cd1094ec1a8c13e36b3d2c0118c..5d4181a2c5110163d1a764af3c61aad339762ddb 100644 (file)
@@ -678,8 +678,8 @@ DIExpression *DIBuilder::createFragmentExpression(unsigned OffsetInBits,
       if (Op.getOp() == dwarf::DW_OP_LLVM_fragment) {
         // Make the new offset point into the existing fragment.
         uint64_t FragmentOffsetInBits = Op.getArg(0);
-        uint64_t FragmentSizeInBits = Op.getArg(1);
-        assert((OffsetInBits + SizeInBits <= FragmentSizeInBits) &&
+        // Op.getArg(1) is FragmentSizeInBits.
+        assert((OffsetInBits + SizeInBits <= Op.getArg(1)) &&
                "new fragment outside of original fragment");
         OffsetInBits += FragmentOffsetInBits;
         break;