[llvm] r310022 - Prevent unused warning in non-assert builds (introduced in r310014).

Daniel Jasper via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 22:05:29 PDT 2017


Author: djasper
Date: Thu Aug  3 22:05:29 2017
New Revision: 310022

URL: http://llvm.org/viewvc/llvm-project?rev=310022&view=rev
Log:
Prevent unused warning in non-assert builds (introduced in r310014).

Modified:
    llvm/trunk/lib/IR/DIBuilder.cpp

Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=310022&r1=310021&r2=310022&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Thu Aug  3 22:05:29 2017
@@ -678,8 +678,8 @@ DIExpression *DIBuilder::createFragmentE
       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;




More information about the llvm-commits mailing list