diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-07-14 04:42:23 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-07-14 04:42:23 +0000 |
commit | b94011fd28ff346162c07a616466e8f966f03297 (patch) | |
tree | b02bd1d36b500796e19d92fbd0b1d74991939ab1 /llvm/lib/IR/Metadata.cpp | |
parent | aa8ceba833e0246b753d91747099052c170a08d2 (diff) | |
download | bcm5719-llvm-b94011fd28ff346162c07a616466e8f966f03297.tar.gz bcm5719-llvm-b94011fd28ff346162c07a616466e8f966f03297.zip |
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
llvm-svn: 186274
Diffstat (limited to 'llvm/lib/IR/Metadata.cpp')
-rw-r--r-- | llvm/lib/IR/Metadata.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<Value*, 4> &EndPoints, ConstantInt *Low, +static bool tryMergeRange(SmallVectorImpl<Value *> &EndPoints, ConstantInt *Low, ConstantInt *High) { ConstantRange NewRange(Low->getValue(), High->getValue()); unsigned Size = EndPoints.size(); @@ -439,7 +439,7 @@ static bool tryMergeRange(SmallVector<Value*, 4> &EndPoints, ConstantInt *Low, return false; } -static void addRange(SmallVector<Value*, 4> &EndPoints, ConstantInt *Low, +static void addRange(SmallVectorImpl<Value *> &EndPoints, ConstantInt *Low, ConstantInt *High) { if (!EndPoints.empty()) if (tryMergeRange(EndPoints, Low, High)) |