mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
DebugInfo: Gut DIExpression
Completely gut `DIExpression`, turning it into a simple wrapper around
`MDExpression *`. There are two bits of magic left:
- It's constructed from `const MDExpression*` but convertible to
`MDExpression*`.
- It's default-constructed to `nullptr`.
Otherwise, it should behave quite like a raw pointer. Once I've done
the same to the rest of the `DIDescriptor` subclasses, I'll come back to
delete them entirely (and update call sites as necessary to deal with
the missing magic).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4191,14 +4191,14 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
|
||||
// Create a piece expression describing the new partition or reuse AI's
|
||||
// expression if there is only one partition.
|
||||
DIExpression PieceExpr = Expr;
|
||||
if (IsSplit || Expr.isBitPiece()) {
|
||||
if (IsSplit || Expr->isBitPiece()) {
|
||||
// If this alloca is already a scalar replacement of a larger aggregate,
|
||||
// Piece.Offset describes the offset inside the scalar.
|
||||
uint64_t Offset = Expr.isBitPiece() ? Expr.getBitPieceOffset() : 0;
|
||||
uint64_t Offset = Expr->isBitPiece() ? Expr->getBitPieceOffset() : 0;
|
||||
uint64_t Start = Offset + Piece.Offset;
|
||||
uint64_t Size = Piece.Size;
|
||||
if (Expr.isBitPiece()) {
|
||||
uint64_t AbsEnd = Expr.getBitPieceOffset() + Expr.getBitPieceSize();
|
||||
if (Expr->isBitPiece()) {
|
||||
uint64_t AbsEnd = Expr->getBitPieceOffset() + Expr->getBitPieceSize();
|
||||
if (Start >= AbsEnd)
|
||||
// No need to describe a SROAed padding.
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user