summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-reduce/deltas
diff options
context:
space:
mode:
authorDiego Trevino Ferrer <diegof30@gmail.com>2019-08-07 01:51:56 +0000
committerDiego Trevino Ferrer <diegof30@gmail.com>2019-08-07 01:51:56 +0000
commit5dbfca85419bda9d432ec43f7ea54d64ee2aab55 (patch)
treefd61c566e7fc3c643d78046a9d9c484d54e80c80 /llvm/tools/llvm-reduce/deltas
parent171dd2e6e5c9e17f0d06a790a5f4bf98aafd4919 (diff)
downloadbcm5719-llvm-5dbfca85419bda9d432ec43f7ea54d64ee2aab55.tar.gz
bcm5719-llvm-5dbfca85419bda9d432ec43f7ea54d64ee2aab55.zip
Added Tool as Dependency to tests & fixed warnings
Summary: Fixes http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/14002 and http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/35392/steps/build_Lld/logs/stdio Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65843 llvm-svn: 368117
Diffstat (limited to 'llvm/tools/llvm-reduce/deltas')
-rw-r--r--llvm/tools/llvm-reduce/deltas/Delta.cpp4
-rw-r--r--llvm/tools/llvm-reduce/deltas/Delta.h6
-rw-r--r--llvm/tools/llvm-reduce/deltas/RemoveFunctions.cpp2
-rw-r--r--llvm/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/llvm/tools/llvm-reduce/deltas/Delta.cpp b/llvm/tools/llvm-reduce/deltas/Delta.cpp
index 203b70ef333..2b0a2ddc84e 100644
--- a/llvm/tools/llvm-reduce/deltas/Delta.cpp
+++ b/llvm/tools/llvm-reduce/deltas/Delta.cpp
@@ -85,7 +85,7 @@ static bool increaseGranularity(std::vector<Chunk> &Chunks) {
if (C.end - C.begin == 0)
NewChunks.push_back(C);
else {
- int Half = (C.begin + C.end) / 2;
+ unsigned Half = (C.begin + C.end) / 2;
NewChunks.push_back({C.begin, Half});
NewChunks.push_back({Half + 1, C.end});
SplitOne = true;
@@ -100,7 +100,7 @@ static bool increaseGranularity(std::vector<Chunk> &Chunks) {
}
void llvm::runDeltaPass(
- TestRunner &Test, int Targets,
+ TestRunner &Test, unsigned Targets,
std::function<std::unique_ptr<Module>(std::vector<Chunk>, Module *)>
ExtractChunksFromModule) {
if (!Targets)
diff --git a/llvm/tools/llvm-reduce/deltas/Delta.h b/llvm/tools/llvm-reduce/deltas/Delta.h
index 9c2b61b0a4b..3c807321967 100644
--- a/llvm/tools/llvm-reduce/deltas/Delta.h
+++ b/llvm/tools/llvm-reduce/deltas/Delta.h
@@ -28,8 +28,8 @@
using namespace llvm;
struct Chunk {
- int begin;
- int end;
+ unsigned begin;
+ unsigned end;
/// Operator when populating CurrentChunks in Generic Delta Pass
friend bool operator!=(const Chunk &C1, const Chunk &C2) {
@@ -66,7 +66,7 @@ namespace llvm {
/// Other implementations of the Delta Debugging algorithm can also be found in
/// the CReduce, Delta, and Lithium projects.
void runDeltaPass(
- TestRunner &Test, int Targets,
+ TestRunner &Test, unsigned Targets,
std::function<std::unique_ptr<Module>(std::vector<Chunk>, Module *)>
ExtractChunksFromModule);
diff --git a/llvm/tools/llvm-reduce/deltas/RemoveFunctions.cpp b/llvm/tools/llvm-reduce/deltas/RemoveFunctions.cpp
index e08c7b99f38..bed8e2b792f 100644
--- a/llvm/tools/llvm-reduce/deltas/RemoveFunctions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/RemoveFunctions.cpp
@@ -23,7 +23,7 @@ extractFunctionsFromModule(std::vector<Chunk> ChunksToKeep, Module *Program) {
// Get functions inside desired chunks
std::set<Function *> FuncsToKeep;
- int I = 0, FunctionCount = 1;
+ unsigned I = 0, FunctionCount = 1;
for (auto &F : *Clone) {
if (!F.isDeclaration() && I < ChunksToKeep.size()) {
if (FunctionCount >= ChunksToKeep[I].begin &&
diff --git a/llvm/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp b/llvm/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
index 28d501d4d83..cd169073992 100644
--- a/llvm/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
+++ b/llvm/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
@@ -21,7 +21,7 @@ extractGVsFromModule(std::vector<Chunk> ChunksToKeep, Module *Program) {
// Get GVs inside desired chunks
std::set<GlobalVariable *> GVsToKeep;
- int I = 0, GVCount = 1;
+ unsigned I = 0, GVCount = 1;
for (auto &GV : Clone->globals()) {
if (GV.hasInitializer() && I < ChunksToKeep.size()) {
if (GVCount >= ChunksToKeep[I].begin && GVCount <= ChunksToKeep[I].end)
OpenPOWER on IntegriCloud