[PATCH] D46391: [DebugInfo] Correction for an assert in DIExpression::createFragmentExpression
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 3 10:08:03 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL331465: [DebugInfo] Correction for an assert in DIExpression::createFragmentExpression (authored by bjope, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46391?vs=145018&id=145039#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46391
Files:
llvm/trunk/lib/IR/DebugInfoMetadata.cpp
Index: llvm/trunk/lib/IR/DebugInfoMetadata.cpp
===================================================================
--- llvm/trunk/lib/IR/DebugInfoMetadata.cpp
+++ llvm/trunk/lib/IR/DebugInfoMetadata.cpp
@@ -830,9 +830,9 @@
case dwarf::DW_OP_LLVM_fragment: {
// Make the new offset point into the existing fragment.
uint64_t FragmentOffsetInBits = Op.getArg(0);
- // Op.getArg(0) is FragmentOffsetInBits.
- // Op.getArg(1) is FragmentSizeInBits.
- assert((OffsetInBits + SizeInBits <= Op.getArg(0) + Op.getArg(1)) &&
+ uint64_t FragmentSizeInBits = Op.getArg(1);
+ (void)FragmentSizeInBits;
+ assert((OffsetInBits + SizeInBits <= FragmentSizeInBits) &&
"new fragment outside of original fragment");
OffsetInBits += FragmentOffsetInBits;
continue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46391.145039.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180503/c1a6807a/attachment.bin>
More information about the llvm-commits
mailing list