llvm-reduce: Fix inconsistencies between int/unsigned usage (standardize on int)
llvm-svn: 372270
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp b/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
index 34977f3..f5f14b8 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
@@ -42,7 +42,7 @@
/// accordingly. It also removes allocations of out-of-chunk arguments.
static void extractArgumentsFromModule(std::vector<Chunk> ChunksToKeep,
Module *Program) {
- unsigned I = 0, ArgCount = 0;
+ int I = 0, ArgCount = 0;
std::set<Argument *> ArgsToKeep;
std::vector<Function *> Funcs;
// Get inside-chunk arguments, as well as their parent function
@@ -50,7 +50,7 @@
if (!F.isDeclaration()) {
Funcs.push_back(&F);
for (auto &A : F.args())
- if (I < ChunksToKeep.size()) {
+ if (I < (int)ChunksToKeep.size()) {
if (ChunksToKeep[I].contains(++ArgCount))
ArgsToKeep.insert(&A);
if (ChunksToKeep[I].end == ArgCount)
@@ -120,6 +120,6 @@
void llvm::reduceArgumentsDeltaPass(TestRunner &Test) {
outs() << "*** Reducing Arguments...\n";
- unsigned ArgCount = countArguments(Test.getProgram());
+ int ArgCount = countArguments(Test.getProgram());
runDeltaPass(Test, ArgCount, extractArgumentsFromModule);
}