@@ -1875,13 +1875,16 @@ bool calculateFragmentIntersectImpl(
18751875 if (AssignRecord->isKillAddress ())
18761876 return false ;
18771877
1878- int64_t AddrOffsetInBytes;
1879- SmallVector<uint64_t > PostOffsetOps; // < Unused.
1880- // Bail if we can't find a constant offset (or none) in the expression.
1881- if (!AssignRecord->getAddressExpression ()->extractLeadingOffset (
1882- AddrOffsetInBytes, PostOffsetOps))
1883- return false ;
1884- int64_t AddrOffsetInBits = AddrOffsetInBytes * 8 ;
1878+ int64_t AddrOffsetInBits;
1879+ {
1880+ int64_t AddrOffsetInBytes;
1881+ SmallVector<uint64_t > PostOffsetOps; // < Unused.
1882+ // Bail if we can't find a constant offset (or none) in the expression.
1883+ if (!AssignRecord->getAddressExpression ()->extractLeadingOffset (
1884+ AddrOffsetInBytes, PostOffsetOps))
1885+ return false ;
1886+ AddrOffsetInBits = AddrOffsetInBytes * 8 ;
1887+ }
18851888
18861889 Value *Addr = AssignRecord->getAddress ();
18871890 // FIXME: It may not always be zero.
@@ -1901,7 +1904,6 @@ bool at::calculateFragmentIntersect(
19011904 const DataLayout &DL, const Value *Dest, uint64_t SliceOffsetInBits,
19021905 uint64_t SliceSizeInBits, const DbgAssignIntrinsic *DbgAssign,
19031906 std::optional<DIExpression::FragmentInfo> &Result) {
1904-
19051907 return calculateFragmentIntersectImpl (DL, Dest, SliceOffsetInBits,
19061908 SliceSizeInBits, DbgAssign, Result);
19071909}
@@ -1912,8 +1914,6 @@ bool at::calculateFragmentIntersect(
19121914 const DataLayout &DL, const Value *Dest, uint64_t SliceOffsetInBits,
19131915 uint64_t SliceSizeInBits, const DbgVariableRecord *DVRAssign,
19141916 std::optional<DIExpression::FragmentInfo> &Result) {
1915- // FIXME: Remove this wrapper function and call
1916- // DIExpression::calculateFragmentIntersect directly.
19171917 return calculateFragmentIntersectImpl (DL, Dest, SliceOffsetInBits,
19181918 SliceSizeInBits, DVRAssign, Result);
19191919}
0 commit comments