mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
Address more review comments for DIExpression::iterator.
- input_iterator - define an operator-> - make constructors private were possible git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226967 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -170,6 +170,11 @@ DIExpression::iterator DIExpression::end() const {
|
||||
return DIExpression::iterator();
|
||||
}
|
||||
|
||||
const DIExpression::Operand &DIExpression::Operand::getNext() const {
|
||||
iterator it(I);
|
||||
return *(++it);
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Predicates
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -606,13 +611,13 @@ bool DIExpression::Verify() const {
|
||||
if (!(isExpression() && DbgNode->getNumOperands() == 1))
|
||||
return false;
|
||||
|
||||
for (auto E = end(), I = begin(); I != E; ++I)
|
||||
switch (*I) {
|
||||
for (auto Op : *this)
|
||||
switch (Op) {
|
||||
case DW_OP_piece:
|
||||
// Must be the last element of the expression.
|
||||
return std::distance(I.getBase(), DIHeaderFieldIterator()) == 3;
|
||||
return std::distance(Op.getBase(), DIHeaderFieldIterator()) == 3;
|
||||
case DW_OP_plus:
|
||||
if (std::distance(I.getBase(), DIHeaderFieldIterator()) < 2)
|
||||
if (std::distance(Op.getBase(), DIHeaderFieldIterator()) < 2)
|
||||
return false;
|
||||
break;
|
||||
case DW_OP_deref:
|
||||
|
Reference in New Issue
Block a user