summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-01-29 15:18:16 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-01-29 15:18:16 +0000
commitf05d2f254ebd27a356f71a01fb706f06aba7d0d1 (patch)
treef69bf08e9db78e94a3a433e085c97cfe21fc4af2 /llvm/lib/IR/Attributes.cpp
parent85f16f946218b172ff96dec4a89778ccacc4e4c1 (diff)
downloadbcm5719-llvm-f05d2f254ebd27a356f71a01fb706f06aba7d0d1.tar.gz
bcm5719-llvm-f05d2f254ebd27a356f71a01fb706f06aba7d0d1.zip
AttributeSet::get(): Fix a valgrind error. It doesn't affect actual behavior, though.
Don't touch I->first on the end iterator, I == E! llvm-svn: 173804
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index ab29766e9ff..2cf76213e07 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud