diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-07-13 10:26:04 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-07-13 10:26:04 +0000 |
commit | 57aa63679434eaead4457308038331e685cef817 (patch) | |
tree | d7b9cfc6a95acb406217829eed59d7569787afe0 /llvm/lib/Analysis/Lint.cpp | |
parent | 00e887b96f54e95af26e0aade6fbdaf68eab0143 (diff) | |
download | bcm5719-llvm-57aa63679434eaead4457308038331e685cef817.tar.gz bcm5719-llvm-57aa63679434eaead4457308038331e685cef817.zip |
Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.
llvm-svn: 135040
Diffstat (limited to 'llvm/lib/Analysis/Lint.cpp')
-rw-r--r-- | llvm/lib/Analysis/Lint.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/Lint.cpp b/llvm/lib/Analysis/Lint.cpp index f130f30c49d..89755da8509 100644 --- a/llvm/lib/Analysis/Lint.cpp +++ b/llvm/lib/Analysis/Lint.cpp @@ -592,8 +592,7 @@ Value *Lint::findValueImpl(Value *V, bool OffsetOk, return findValueImpl(CI->getOperand(0), OffsetOk, Visited); } else if (ExtractValueInst *Ex = dyn_cast<ExtractValueInst>(V)) { if (Value *W = FindInsertedValue(Ex->getAggregateOperand(), - Ex->idx_begin(), - Ex->idx_end())) + Ex->getIndices())) if (W != V) return findValueImpl(W, OffsetOk, Visited); } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { @@ -607,9 +606,7 @@ Value *Lint::findValueImpl(Value *V, bool OffsetOk, return findValueImpl(CE->getOperand(0), OffsetOk, Visited); } else if (CE->getOpcode() == Instruction::ExtractValue) { ArrayRef<unsigned> Indices = CE->getIndices(); - if (Value *W = FindInsertedValue(CE->getOperand(0), - Indices.begin(), - Indices.end())) + if (Value *W = FindInsertedValue(CE->getOperand(0), Indices)) if (W != V) return findValueImpl(W, OffsetOk, Visited); } |