From b94011fd28ff346162c07a616466e8f966f03297 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 14 Jul 2013 04:42:23 +0000 Subject: Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size. llvm-svn: 186274 --- llvm/lib/IR/Metadata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/IR/Metadata.cpp') diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp index 6a6b7af5cb9..bd4d9c0a077 100644 --- a/llvm/lib/IR/Metadata.cpp +++ b/llvm/lib/IR/Metadata.cpp @@ -422,7 +422,7 @@ static bool canBeMerged(const ConstantRange &A, const ConstantRange &B) { return !A.intersectWith(B).isEmptySet() || isContiguous(A, B); } -static bool tryMergeRange(SmallVector &EndPoints, ConstantInt *Low, +static bool tryMergeRange(SmallVectorImpl &EndPoints, ConstantInt *Low, ConstantInt *High) { ConstantRange NewRange(Low->getValue(), High->getValue()); unsigned Size = EndPoints.size(); @@ -439,7 +439,7 @@ static bool tryMergeRange(SmallVector &EndPoints, ConstantInt *Low, return false; } -static void addRange(SmallVector &EndPoints, ConstantInt *Low, +static void addRange(SmallVectorImpl &EndPoints, ConstantInt *Low, ConstantInt *High) { if (!EndPoints.empty()) if (tryMergeRange(EndPoints, Low, High)) -- cgit v1.2.3