diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-29 15:18:16 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-29 15:18:16 +0000 |
commit | 3ba51cefb75364a17e3a23c54c216035c33e67a6 (patch) | |
tree | 9a437d74bcb2505c2ee6fce68218da6030ad3102 /lib/IR | |
parent | 7c1ac767691b2cb5d3367e667e51714f34eb675b (diff) |
AttributeSet::get(): Fix a valgrind error. It doesn't affect actual behavior, though.
Don't touch I->first on the end iterator, I == E!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/Attributes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index ab29766e9f..2cf76213e0 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -455,7 +455,7 @@ AttributeSet AttributeSet::get(LLVMContext &C, 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; } |