summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-reduce
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-reduce')
-rw-r--r--llvm/tools/llvm-reduce/deltas/Delta.cpp4
-rw-r--r--llvm/tools/llvm-reduce/deltas/Delta.h4
-rw-r--r--llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp5
-rw-r--r--llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp2
4 files changed, 10 insertions, 5 deletions
diff --git a/llvm/tools/llvm-reduce/deltas/Delta.cpp b/llvm/tools/llvm-reduce/deltas/Delta.cpp
index 68a9272b88d..c6c39d979f6 100644
--- a/llvm/tools/llvm-reduce/deltas/Delta.cpp
+++ b/llvm/tools/llvm-reduce/deltas/Delta.cpp
@@ -15,6 +15,8 @@
#include "Delta.h"
#include "llvm/ADT/STLExtras.h"
+using namespace llvm;
+
/// Writes IR code to the given Filepath
static bool writeProgramToFile(StringRef Filepath, int FD, const Module &M) {
ToolOutputFile Out(Filepath, FD);
@@ -165,4 +167,4 @@ void llvm::runDeltaPass(
if (ReducedProgram)
Test.setProgram(std::move(ReducedProgram));
errs() << "Couldn't increase anymore.\n";
-} \ No newline at end of file
+}
diff --git a/llvm/tools/llvm-reduce/deltas/Delta.h b/llvm/tools/llvm-reduce/deltas/Delta.h
index d4217872333..54e5258e0bf 100644
--- a/llvm/tools/llvm-reduce/deltas/Delta.h
+++ b/llvm/tools/llvm-reduce/deltas/Delta.h
@@ -26,7 +26,7 @@
#include <set>
#include <vector>
-using namespace llvm;
+namespace llvm {
struct Chunk {
unsigned begin;
@@ -53,8 +53,6 @@ struct Chunk {
}
};
-namespace llvm {
-
/// This function implements the Delta Debugging algorithm, it receives a
/// number of Targets (e.g. Functions, Instructions, Basic Blocks, etc.) and
/// splits them in half; these chunks of targets are then tested while ignoring
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
index 90937d5476c..bfd5106fd87 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
@@ -13,6 +13,9 @@
//===----------------------------------------------------------------------===//
#include "ReduceFunctions.h"
+#include "Delta.h"
+
+using namespace llvm;
/// Removes all the Defined Functions (as well as their calls)
/// that aren't inside any of the desired Chunks.
@@ -69,4 +72,4 @@ void llvm::reduceFunctionsDeltaPass(TestRunner &Test) {
unsigned Functions = countFunctions(Test.getProgram());
runDeltaPass(Test, Functions, extractFunctionsFromModule);
errs() << "----------------------------\n";
-} \ No newline at end of file
+}
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
index efe30c4ac3c..fd7cbf2817c 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
@@ -13,6 +13,8 @@
#include "ReduceGlobalVars.h"
+using namespace llvm;
+
/// Removes all the Initialized GVs that aren't inside the desired Chunks.
static void extractGVsFromModule(std::vector<Chunk> ChunksToKeep,
Module *Program) {
OpenPOWER on IntegriCloud