[PATCH] D46391: [DebugInfo] Correction for an assert in DIExpression::createFragmentExpression

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 08:39:31 PDT 2018


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

So this is making the assertion even stricter. Thanks!



================
Comment at: lib/IR/DebugInfoMetadata.cpp:832
         // Make the new offset point into the existing fragment.
         uint64_t FragmentOffsetInBits = Op.getArg(0);
         // Op.getArg(0) is FragmentOffsetInBits.
----------------
Actually this comment is silly, too:
```
        uint64_t FragmentOffsetInBits = Op.getArg(0);
        uint64_t FragmentSizeInBits = Op.getArg(1);
        (void)FragmentSizeInBits;
        assert((OffsetInBits + SizeInBits <= FragmentSizeInBits) && ....);
```


Repository:
  rL LLVM

https://reviews.llvm.org/D46391





More information about the llvm-commits mailing list