[PATCH] D65843: Added Tool as Dependency to tests & fixed warnings
Diego TreviƱo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 18:48:39 PDT 2019
diegotf created this revision.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D65843
Files:
llvm/test/CMakeLists.txt
llvm/tools/llvm-reduce/deltas/Delta.cpp
llvm/tools/llvm-reduce/deltas/Delta.h
llvm/tools/llvm-reduce/deltas/RemoveFunctions.cpp
llvm/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
Index: llvm/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
===================================================================
--- llvm/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
+++ llvm/tools/llvm-reduce/deltas/RemoveGlobalVars.cpp
@@ -21,7 +21,7 @@
// 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)
Index: llvm/tools/llvm-reduce/deltas/RemoveFunctions.cpp
===================================================================
--- llvm/tools/llvm-reduce/deltas/RemoveFunctions.cpp
+++ llvm/tools/llvm-reduce/deltas/RemoveFunctions.cpp
@@ -23,7 +23,7 @@
// 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 &&
Index: llvm/tools/llvm-reduce/deltas/Delta.h
===================================================================
--- llvm/tools/llvm-reduce/deltas/Delta.h
+++ 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 @@
/// 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);
Index: llvm/tools/llvm-reduce/deltas/Delta.cpp
===================================================================
--- llvm/tools/llvm-reduce/deltas/Delta.cpp
+++ llvm/tools/llvm-reduce/deltas/Delta.cpp
@@ -85,7 +85,7 @@
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 @@
}
void llvm::runDeltaPass(
- TestRunner &Test, int Targets,
+ TestRunner &Test, unsigned Targets,
std::function<std::unique_ptr<Module>(std::vector<Chunk>, Module *)>
ExtractChunksFromModule) {
if (!Targets)
Index: llvm/test/CMakeLists.txt
===================================================================
--- llvm/test/CMakeLists.txt
+++ llvm/test/CMakeLists.txt
@@ -89,6 +89,7 @@
llvm-rc
llvm-readobj
llvm-readelf
+ llvm-reduce
llvm-rtdyld
llvm-size
llvm-split
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65843.213779.patch
Type: text/x-patch
Size: 3000 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190807/545d8bbb/attachment.bin>
More information about the llvm-commits
mailing list