summaryrefslogtreecommitdiff
path: root/llvm/tools/bugpoint/ExecutionDriver.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2015-10-14 20:29:54 +0000
committerDavide Italiano <davide@freebsd.org>2015-10-14 20:29:54 +0000
commitab2562199749a2522ed3a2c7fe31ec9489c7a9fe (patch)
treee816428bc9d33a76b200b1efcf1d24126dffe3e8 /llvm/tools/bugpoint/ExecutionDriver.cpp
parent92b9ec3c842a5c483f948eaf521e532b3a8ae9d0 (diff)
[Bugpoint] Use 'CC' instead of 'GCC' for variable naming.
We now use clang by default and fallback to gcc when requested. With this commit, names reflect reality. No functional change intended. Discussed with: Rafael Espindola. llvm-svn: 250321
Diffstat (limited to 'llvm/tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r--llvm/tools/bugpoint/ExecutionDriver.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/llvm/tools/bugpoint/ExecutionDriver.cpp b/llvm/tools/bugpoint/ExecutionDriver.cpp
index d7964f357bc8..41b8ccc18e87 100644
--- a/llvm/tools/bugpoint/ExecutionDriver.cpp
+++ b/llvm/tools/bugpoint/ExecutionDriver.cpp
@@ -125,10 +125,10 @@ namespace {
cl::ZeroOrMore, cl::PositionalEatsArgs);
cl::opt<std::string>
- GCCBinary("gcc", cl::init(""), cl::desc("The gcc binary to use."));
+ CCBinary("gcc", cl::init(""), cl::desc("The gcc binary to use."));
cl::list<std::string>
- GCCToolArgv("gcc-tool-args", cl::Positional,
+ CCToolArgv("gcc-tool-args", cl::Positional,
cl::desc("<gcc-tool arguments>..."),
cl::ZeroOrMore, cl::PositionalEatsArgs);
}
@@ -148,11 +148,11 @@ bool BugDriver::initializeExecutionEnvironment() {
SafeInterpreter = nullptr;
std::string Message;
- if (GCCBinary.empty()) {
+ if (CCBinary.empty()) {
if (sys::findProgramByName("clang"))
- GCCBinary = "clang";
+ CCBinary = "clang";
else
- GCCBinary = "gcc";
+ CCBinary = "gcc";
}
switch (InterpreterSel) {
@@ -165,8 +165,8 @@ bool BugDriver::initializeExecutionEnvironment() {
if (!Interpreter) {
InterpreterSel = RunLLC;
Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
- GCCBinary, &ToolArgv,
- &GCCToolArgv);
+ CCBinary, &ToolArgv,
+ &CCToolArgv);
}
if (!Interpreter) {
InterpreterSel = RunLLI;
@@ -186,8 +186,8 @@ bool BugDriver::initializeExecutionEnvironment() {
case RunLLCIA:
case LLC_Safe:
Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
- GCCBinary, &ToolArgv,
- &GCCToolArgv,
+ CCBinary, &ToolArgv,
+ &CCToolArgv,
InterpreterSel == RunLLCIA);
break;
case RunJIT:
@@ -220,9 +220,9 @@ bool BugDriver::initializeExecutionEnvironment() {
SafeInterpreterSel = RunLLC;
SafeToolArgs.push_back("--relocation-model=pic");
SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message,
- GCCBinary,
+ CCBinary,
&SafeToolArgs,
- &GCCToolArgv);
+ &CCToolArgv);
}
if (!SafeInterpreter &&
@@ -231,9 +231,9 @@ bool BugDriver::initializeExecutionEnvironment() {
SafeInterpreterSel = RunLLC;
SafeToolArgs.push_back("--relocation-model=pic");
SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message,
- GCCBinary,
+ CCBinary,
&SafeToolArgs,
- &GCCToolArgv);
+ &CCToolArgv);
}
if (!SafeInterpreter) {
SafeInterpreterSel = AutoPick;
@@ -244,8 +244,8 @@ bool BugDriver::initializeExecutionEnvironment() {
case RunLLCIA:
SafeToolArgs.push_back("--relocation-model=pic");
SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message,
- GCCBinary, &SafeToolArgs,
- &GCCToolArgv,
+ CCBinary, &SafeToolArgs,
+ &CCToolArgv,
SafeInterpreterSel == RunLLCIA);
break;
case Custom:
@@ -259,8 +259,8 @@ bool BugDriver::initializeExecutionEnvironment() {
}
if (!SafeInterpreter) { outs() << Message << "\nExiting.\n"; exit(1); }
- gcc = GCC::create(Message, GCCBinary, &GCCToolArgv);
- if (!gcc) { outs() << Message << "\nExiting.\n"; exit(1); }
+ cc = CC::create(Message, CCBinary, &CCToolArgv);
+ if (!cc) { outs() << Message << "\nExiting.\n"; exit(1); }
// If there was an error creating the selected interpreter, quit with error.
return Interpreter == nullptr;
@@ -395,13 +395,13 @@ std::string BugDriver::compileSharedObject(const std::string &BitcodeFile,
std::string OutputFile;
// Using the known-good backend.
- GCC::FileType FT = SafeInterpreter->OutputCode(BitcodeFile, OutputFile,
+ CC::FileType FT = SafeInterpreter->OutputCode(BitcodeFile, OutputFile,
Error);
if (!Error.empty())
return "";
std::string SharedObjectFile;
- bool Failure = gcc->MakeSharedObject(OutputFile, FT, SharedObjectFile,
+ bool Failure = cc->MakeSharedObject(OutputFile, FT, SharedObjectFile,
AdditionalLinkerArgs, Error);
if (!Error.empty())
return "";