aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/bugpoint
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/bugpoint')
-rw-r--r--llvm/tools/bugpoint/BugDriver.h5
-rw-r--r--llvm/tools/bugpoint/ExecutionDriver.cpp17
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp3
-rw-r--r--llvm/tools/bugpoint/ListReducer.h2
-rw-r--r--llvm/tools/bugpoint/Miscompilation.cpp5
-rw-r--r--llvm/tools/bugpoint/OptimizerDriver.cpp4
-rw-r--r--llvm/tools/bugpoint/ToolRunner.h2
7 files changed, 14 insertions, 24 deletions
diff --git a/llvm/tools/bugpoint/BugDriver.h b/llvm/tools/bugpoint/BugDriver.h
index ca57405..71a5aa1 100644
--- a/llvm/tools/bugpoint/BugDriver.h
+++ b/llvm/tools/bugpoint/BugDriver.h
@@ -16,6 +16,7 @@
#define LLVM_TOOLS_BUGPOINT_BUGDRIVER_H
#include "llvm/IR/ValueMap.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Transforms/Utils/ValueMapper.h"
@@ -41,6 +42,10 @@ extern bool DisableSimplifyCFG;
///
extern bool BugpointIsInterrupted;
+/// Command line options used across files.
+extern cl::list<std::string> InputArgv;
+extern cl::opt<std::string> OutputPrefix;
+
class BugDriver {
LLVMContext &Context;
const char *ToolName; // argv[0] of bugpoint
diff --git a/llvm/tools/bugpoint/ExecutionDriver.cpp b/llvm/tools/bugpoint/ExecutionDriver.cpp
index 8c6b7fb..96eeb35 100644
--- a/llvm/tools/bugpoint/ExecutionDriver.cpp
+++ b/llvm/tools/bugpoint/ExecutionDriver.cpp
@@ -13,7 +13,6 @@
#include "BugDriver.h"
#include "ToolRunner.h"
-#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Support/Program.h"
@@ -102,15 +101,13 @@ static cl::opt<std::string> CustomExecCommand(
// Anything specified after the --args option are taken as arguments to the
// program being debugged.
-namespace llvm {
-cl::list<std::string> InputArgv("args", cl::Positional,
- cl::desc("<program arguments>..."),
- cl::PositionalEatsArgs);
-
-cl::opt<std::string>
- OutputPrefix("output-prefix", cl::init("bugpoint"),
- cl::desc("Prefix to use for outputs (default: 'bugpoint')"));
-} // namespace llvm
+cl::list<std::string> llvm::InputArgv("args", cl::Positional,
+ cl::desc("<program arguments>..."),
+ cl::PositionalEatsArgs);
+
+cl::opt<std::string> llvm::OutputPrefix(
+ "output-prefix", cl::init("bugpoint"),
+ cl::desc("Prefix to use for outputs (default: 'bugpoint')"));
static cl::list<std::string> ToolArgv("tool-args", cl::Positional,
cl::desc("<tool arguments>..."),
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index 3206589..31cdd0d 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -36,9 +36,6 @@ using namespace llvm;
#define DEBUG_TYPE "bugpoint"
bool llvm::DisableSimplifyCFG = false;
-namespace llvm {
-extern cl::opt<std::string> OutputPrefix;
-} // namespace llvm
static cl::opt<bool>
NoDCE("disable-dce",
diff --git a/llvm/tools/bugpoint/ListReducer.h b/llvm/tools/bugpoint/ListReducer.h
index 06f8ddb2..ceee853 100644
--- a/llvm/tools/bugpoint/ListReducer.h
+++ b/llvm/tools/bugpoint/ListReducer.h
@@ -32,7 +32,7 @@ template <typename ElTy> struct ListReducer {
KeepPrefix // The prefix alone satisfies the predicate
};
- virtual ~ListReducer() {}
+ virtual ~ListReducer() = default;
/// This virtual function should be overriden by subclasses to implement the
/// test desired. The testcase is only required to test to see if the Kept
diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp
index a7f1643..dcad126 100644
--- a/llvm/tools/bugpoint/Miscompilation.cpp
+++ b/llvm/tools/bugpoint/Miscompilation.cpp
@@ -28,11 +28,6 @@
using namespace llvm;
-namespace llvm {
-extern cl::opt<std::string> OutputPrefix;
-extern cl::list<std::string> InputArgv;
-} // end namespace llvm
-
static cl::opt<bool> DisableLoopExtraction(
"disable-loop-extraction",
cl::desc("Don't extract loops when searching for miscompilations"),
diff --git a/llvm/tools/bugpoint/OptimizerDriver.cpp b/llvm/tools/bugpoint/OptimizerDriver.cpp
index bf2e8c0..191f87c 100644
--- a/llvm/tools/bugpoint/OptimizerDriver.cpp
+++ b/llvm/tools/bugpoint/OptimizerDriver.cpp
@@ -34,10 +34,6 @@ using namespace llvm;
#define DEBUG_TYPE "bugpoint"
-namespace llvm {
-extern cl::opt<std::string> OutputPrefix;
-}
-
static cl::opt<std::string>
OptCmd("opt-command", cl::init(""),
cl::desc("Path to opt. (default: search path "
diff --git a/llvm/tools/bugpoint/ToolRunner.h b/llvm/tools/bugpoint/ToolRunner.h
index c9da9af..9ff0663 100644
--- a/llvm/tools/bugpoint/ToolRunner.h
+++ b/llvm/tools/bugpoint/ToolRunner.h
@@ -105,7 +105,7 @@ public:
createCustomExecutor(const char *Argv0, std::string &Message,
const std::string &ExecCommandLine);
- virtual ~AbstractInterpreter() {}
+ virtual ~AbstractInterpreter() = default;
/// compileProgram - Compile the specified program from bitcode to executable
/// code. This does not produce any output, it is only used when debugging