diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-14 01:12:42 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-14 01:12:42 +0000 |
commit | 6a0320a99194a120a9a77db7c5919052d060a01f (patch) | |
tree | 36abb6f0f334bd720797a0832b9fe33e88e2a12a /llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h | |
parent | 97d30b87f36d9266be1f3a92940fd95dc1c77ad0 (diff) | |
download | bcm5719-llvm-6a0320a99194a120a9a77db7c5919052d060a01f.tar.gz bcm5719-llvm-6a0320a99194a120a9a77db7c5919052d060a01f.zip |
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).
llvm-svn: 234832
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h index f50ebae7ba6..dd7f806e029 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h +++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h @@ -76,7 +76,7 @@ public: MachineLocation getLoc() const { return Loc; } const MDNode *getVariableNode() const { return Variable; } DIVariable getVariable() const { return cast<MDLocalVariable>(Variable); } - bool isBitPiece() const { return getExpression().isBitPiece(); } + bool isBitPiece() const { return getExpression()->isBitPiece(); } DIExpression getExpression() const { return cast_or_null<MDExpression>(Expression); } @@ -108,8 +108,7 @@ public: DIExpression NextExpr = cast_or_null<MDExpression>(Next.Values[0].Expression); DIVariable NextVar = cast_or_null<MDLocalVariable>(Next.Values[0].Variable); - if (Var == NextVar && Expr.isBitPiece() && - NextExpr.isBitPiece()) { + if (Var == NextVar && Expr->isBitPiece() && NextExpr->isBitPiece()) { addValues(Next.Values); End = Next.End; return true; @@ -192,8 +191,8 @@ inline bool operator==(const DebugLocEntry::Value &A, /// \brief Compare two pieces based on their offset. inline bool operator<(const DebugLocEntry::Value &A, const DebugLocEntry::Value &B) { - return A.getExpression().getBitPieceOffset() < - B.getExpression().getBitPieceOffset(); + return A.getExpression()->getBitPieceOffset() < + B.getExpression()->getBitPieceOffset(); } } |