@@ -1875,13 +1875,16 @@ bool calculateFragmentIntersectImpl(
1875
1875
if (AssignRecord->isKillAddress ())
1876
1876
return false ;
1877
1877
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
+ }
1885
1888
1886
1889
Value *Addr = AssignRecord->getAddress ();
1887
1890
// FIXME: It may not always be zero.
@@ -1901,7 +1904,6 @@ bool at::calculateFragmentIntersect(
1901
1904
const DataLayout &DL, const Value *Dest, uint64_t SliceOffsetInBits,
1902
1905
uint64_t SliceSizeInBits, const DbgAssignIntrinsic *DbgAssign,
1903
1906
std::optional<DIExpression::FragmentInfo> &Result) {
1904
-
1905
1907
return calculateFragmentIntersectImpl (DL, Dest, SliceOffsetInBits,
1906
1908
SliceSizeInBits, DbgAssign, Result);
1907
1909
}
@@ -1912,8 +1914,6 @@ bool at::calculateFragmentIntersect(
1912
1914
const DataLayout &DL, const Value *Dest, uint64_t SliceOffsetInBits,
1913
1915
uint64_t SliceSizeInBits, const DbgVariableRecord *DVRAssign,
1914
1916
std::optional<DIExpression::FragmentInfo> &Result) {
1915
- // FIXME: Remove this wrapper function and call
1916
- // DIExpression::calculateFragmentIntersect directly.
1917
1917
return calculateFragmentIntersectImpl (DL, Dest, SliceOffsetInBits,
1918
1918
SliceSizeInBits, DVRAssign, Result);
1919
1919
}
0 commit comments