[llvm] b23ba29 - DebugInfo: Make DWARFExpression::iterator::operator++ return itself
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 15 17:29:35 PST 2021
Author: Duncan P. N. Exon Smith
Date: 2021-11-15T17:29:00-08:00
New Revision: b23ba295bd129315eac09a52cf58346081e6fdc8
URL: https://github.com/llvm/llvm-project/commit/b23ba295bd129315eac09a52cf58346081e6fdc8
DIFF: https://github.com/llvm/llvm-project/commit/b23ba295bd129315eac09a52cf58346081e6fdc8.diff
LOG: DebugInfo: Make DWARFExpression::iterator::operator++ return itself
Looks like an accident that `operator++` was returning `Operator&`
instead of `iterator&`. Update to match standard iterator behaviour.
Added:
Modified:
llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
index dc575265d816..9ebe9b0e4110 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
@@ -116,12 +116,12 @@ class DWARFExpression {
}
public:
- class Operation &operator++() {
+ iterator &operator++() {
Offset = Op.isError() ? Expr->Data.getData().size() : Op.EndOffset;
Op.Error =
Offset >= Expr->Data.getData().size() ||
!Op.extract(Expr->Data, Expr->AddressSize, Offset, Expr->Format);
- return Op;
+ return *this;
}
class Operation &operator*() const {
More information about the llvm-commits
mailing list