[Bugpoint] Use 'CC' instead of 'GCC' for variable naming.
[oota-llvm.git] / tools / bugpoint / ExecutionDriver.cpp
index d7964f357bc83fd0cc084d9ae2b871a45f40d130..41b8ccc18e87136dfc1b2000990de0e385fd1148 100644 (file)
@@ -125,10 +125,10 @@ namespace {
                cl::ZeroOrMore, cl::PositionalEatsArgs);
 
   cl::opt<std::string>
                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>
 
   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);
 }
               cl::desc("<gcc-tool arguments>..."),
               cl::ZeroOrMore, cl::PositionalEatsArgs);
 }
@@ -148,11 +148,11 @@ bool BugDriver::initializeExecutionEnvironment() {
   SafeInterpreter = nullptr;
   std::string Message;
 
   SafeInterpreter = nullptr;
   std::string Message;
 
-  if (GCCBinary.empty()) {
+  if (CCBinary.empty()) {
     if (sys::findProgramByName("clang"))
     if (sys::findProgramByName("clang"))
-      GCCBinary = "clang";
+      CCBinary = "clang";
     else
     else
-      GCCBinary = "gcc";
+      CCBinary = "gcc";
   }
 
   switch (InterpreterSel) {
   }
 
   switch (InterpreterSel) {
@@ -165,8 +165,8 @@ bool BugDriver::initializeExecutionEnvironment() {
     if (!Interpreter) {
       InterpreterSel = RunLLC;
       Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
     if (!Interpreter) {
       InterpreterSel = RunLLC;
       Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
-                                                   GCCBinary, &ToolArgv,
-                                                   &GCCToolArgv);
+                                                   CCBinary, &ToolArgv,
+                                                   &CCToolArgv);
     }
     if (!Interpreter) {
       InterpreterSel = RunLLI;
     }
     if (!Interpreter) {
       InterpreterSel = RunLLI;
@@ -186,8 +186,8 @@ bool BugDriver::initializeExecutionEnvironment() {
   case RunLLCIA:
   case LLC_Safe:
     Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
   case RunLLCIA:
   case LLC_Safe:
     Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
-                                                 GCCBinary, &ToolArgv,
-                                                 &GCCToolArgv,
+                                                 CCBinary, &ToolArgv,
+                                                 &CCToolArgv,
                                                  InterpreterSel == RunLLCIA);
     break;
   case RunJIT:
                                                  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,
       SafeInterpreterSel = RunLLC;
       SafeToolArgs.push_back("--relocation-model=pic");
       SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message,
-                                                       GCCBinary,
+                                                       CCBinary,
                                                        &SafeToolArgs,
                                                        &SafeToolArgs,
-                                                       &GCCToolArgv);
+                                                       &CCToolArgv);
     }
 
     if (!SafeInterpreter &&
     }
 
     if (!SafeInterpreter &&
@@ -231,9 +231,9 @@ bool BugDriver::initializeExecutionEnvironment() {
       SafeInterpreterSel = RunLLC;
       SafeToolArgs.push_back("--relocation-model=pic");
       SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message,
       SafeInterpreterSel = RunLLC;
       SafeToolArgs.push_back("--relocation-model=pic");
       SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message,
-                                                       GCCBinary,
+                                                       CCBinary,
                                                        &SafeToolArgs,
                                                        &SafeToolArgs,
-                                                       &GCCToolArgv);
+                                                       &CCToolArgv);
     }
     if (!SafeInterpreter) {
       SafeInterpreterSel = AutoPick;
     }
     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,
   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:
                                                 SafeInterpreterSel == RunLLCIA);
     break;
   case Custom:
@@ -259,8 +259,8 @@ bool BugDriver::initializeExecutionEnvironment() {
   }
   if (!SafeInterpreter) { outs() << Message << "\nExiting.\n"; exit(1); }
 
   }
   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;
 
   // 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.
   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;
                                                  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 "";
                                        AdditionalLinkerArgs, Error);
   if (!Error.empty())
     return "";