[llvm] r227012 - DebugInfo: Fix use after return found by asan.
Benjamin Kramer
benny.kra at googlemail.com
Sat Jan 24 11:55:23 PST 2015
Author: d0k
Date: Sat Jan 24 13:55:23 2015
New Revision: 227012
URL: http://llvm.org/viewvc/llvm-project?rev=227012&view=rev
Log:
DebugInfo: Fix use after return found by asan.
Modified:
llvm/trunk/include/llvm/IR/DebugInfo.h
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=227012&r1=227011&r2=227012&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Sat Jan 24 13:55:23 2015
@@ -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.
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=227012&r1=227011&r2=227012&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Sat Jan 24 13:55:23 2015
@@ -170,7 +170,7 @@ DIExpression::iterator DIExpression::end
return DIExpression::iterator();
}
-const DIExpression::Operand &DIExpression::Operand::getNext() const {
+DIExpression::Operand DIExpression::Operand::getNext() const {
iterator it(I);
return *(++it);
}
More information about the llvm-commits
mailing list