[llvm] r173804 - AttributeSet::get(): Fix a valgrind error. It doesn't affect actual behavior, though.
NAKAMURA Takumi
geek4civic at gmail.com
Tue Jan 29 07:18:16 PST 2013
Author: chapuni
Date: Tue Jan 29 09:18:16 2013
New Revision: 173804
URL: http://llvm.org/viewvc/llvm-project?rev=173804&view=rev
Log:
AttributeSet::get(): Fix a valgrind error. It doesn't affect actual behavior, though.
Don't touch I->first on the end iterator, I == E!
Modified:
llvm/trunk/lib/IR/Attributes.cpp
Modified: llvm/trunk/lib/IR/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=173804&r1=173803&r2=173804&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Attributes.cpp (original)
+++ llvm/trunk/lib/IR/Attributes.cpp Tue Jan 29 09:18:16 2013
@@ -455,7 +455,7 @@ AttributeSet AttributeSet::get(LLVMConte
E = Attrs.end(); I != E; ) {
unsigned Index = I->first;
SmallVector<Attribute, 4> AttrVec;
- while (I->first == Index && I != E) {
+ while (I != E && I->first == Index) {
AttrVec.push_back(I->second);
++I;
}
More information about the llvm-commits
mailing list