diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-03-04 17:39:33 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-03-04 17:39:33 +0000 |
commit | 0f61579602d6b923cb44b432f29e6d83b04b0945 (patch) | |
tree | e8a23701c5911a0ee62f53e0ef7afaa4dd6f7457 /llvm/lib/IR/DebugInfo.cpp | |
parent | d2af89df107a1e949b388c3431b4c79a6ed2290b (diff) | |
download | bcm5719-llvm-0f61579602d6b923cb44b432f29e6d83b04b0945.tar.gz bcm5719-llvm-0f61579602d6b923cb44b432f29e6d83b04b0945.zip |
Fix DwarfExpression::AddMachineRegExpression so it doesn't read past the
end of an expression that ends with DW_OP_plus.
Caught by the ASAN build bots.
llvm-svn: 231260
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index d44d6c9e15b..3db74fcee58 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -183,9 +183,9 @@ uint64_t DIExpression::getBitPieceSize() const { return getElement(getNumElements()-1); } -DIExpression::Operand DIExpression::Operand::getNext() const { +DIExpression::iterator DIExpression::Operand::getNext() const { iterator it(I); - return *(++it); + return ++it; } //===----------------------------------------------------------------------===// |