DebugInfo: Fix use after return found by asan.

llvm-svn: 227012
This commit is contained in:
Benjamin Kramer 2015-01-24 19:55:23 +00:00
parent 069ff67b1a
commit 4d50b6c306
2 changed files with 2 additions and 2 deletions

View File

@ -886,7 +886,7 @@ public:
/// \brief Returns underlying DIHeaderFieldIterator.
const DIHeaderFieldIterator &getBase() const { return I; }
/// \brief Returns the next operand.
const Operand &getNext() const;
Operand getNext() const;
};
/// \brief An iterator for DIExpression elements.

View File

@ -170,7 +170,7 @@ DIExpression::iterator DIExpression::end() const {
return DIExpression::iterator();
}
const DIExpression::Operand &DIExpression::Operand::getNext() const {
DIExpression::Operand DIExpression::Operand::getNext() const {
iterator it(I);
return *(++it);
}