[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
diff --git a/llvm/tools/bugpoint/ToolRunner.h b/llvm/tools/bugpoint/ToolRunner.h
index 5d67a94..3accd70 100644
--- a/llvm/tools/bugpoint/ToolRunner.h
+++ b/llvm/tools/bugpoint/ToolRunner.h
@@ -33,22 +33,22 @@
class LLC;
//===---------------------------------------------------------------------===//
-// GCC abstraction
+// CC abstraction
//
-class GCC {
- std::string GCCPath; // The path to the gcc executable.
+class CC {
+ std::string CCPath; // The path to the cc executable.
std::string RemoteClientPath; // The path to the rsh / ssh executable.
- std::vector<std::string> gccArgs; // GCC-specific arguments.
- GCC(StringRef gccPath, StringRef RemotePath,
- const std::vector<std::string> *GCCArgs)
- : GCCPath(gccPath), RemoteClientPath(RemotePath) {
- if (GCCArgs) gccArgs = *GCCArgs;
+ std::vector<std::string> ccArgs; // CC-specific arguments.
+ CC(StringRef ccPath, StringRef RemotePath,
+ const std::vector<std::string> *CCArgs)
+ : CCPath(ccPath), RemoteClientPath(RemotePath) {
+ if (CCArgs) ccArgs = *CCArgs;
}
public:
enum FileType { AsmFile, ObjectFile, CFile };
- static GCC *create(std::string &Message,
- const std::string &GCCBinary,
+ static CC *create(std::string &Message,
+ const std::string &CCBinary,
const std::vector<std::string> *Args);
/// ExecuteProgram - Execute the program specified by "ProgramFile" (which is
@@ -64,7 +64,7 @@
const std::string &InputFile,
const std::string &OutputFile,
std::string *Error = nullptr,
- const std::vector<std::string> &GCCArgs =
+ const std::vector<std::string> &CCArgs =
std::vector<std::string>(),
unsigned Timeout = 0,
unsigned MemoryLimit = 0);
@@ -74,7 +74,7 @@
///
int MakeSharedObject(const std::string &InputFile, FileType fileType,
std::string &OutputFile,
- const std::vector<std::string> &ArgsForGCC,
+ const std::vector<std::string> &ArgsForCC,
std::string &Error);
};
@@ -88,9 +88,9 @@
virtual void anchor();
public:
static LLC *createLLC(const char *Argv0, std::string &Message,
- const std::string &GCCBinary,
+ const std::string &CCBinary,
const std::vector<std::string> *Args = nullptr,
- const std::vector<std::string> *GCCArgs = nullptr,
+ const std::vector<std::string> *CCArgs = nullptr,
bool UseIntegratedAssembler = false);
static AbstractInterpreter*
@@ -119,15 +119,15 @@
unsigned Timeout = 0, unsigned MemoryLimit = 0) {}
/// OutputCode - Compile the specified program from bitcode to code
- /// understood by the GCC driver (either C or asm). If the code generator
+ /// understood by the CC driver (either C or asm). If the code generator
/// fails, it sets Error, otherwise, this function returns the type of code
/// emitted.
- virtual GCC::FileType OutputCode(const std::string &Bitcode,
+ virtual CC::FileType OutputCode(const std::string &Bitcode,
std::string &OutFile, std::string &Error,
unsigned Timeout = 0,
unsigned MemoryLimit = 0) {
Error = "OutputCode not supported by this AbstractInterpreter!";
- return GCC::AsmFile;
+ return CC::AsmFile;
}
/// ExecuteProgram - Run the specified bitcode file, emitting output to the
@@ -140,7 +140,7 @@
const std::string &InputFile,
const std::string &OutputFile,
std::string *Error,
- const std::vector<std::string> &GCCArgs =
+ const std::vector<std::string> &CCArgs =
std::vector<std::string>(),
const std::vector<std::string> &SharedLibs =
std::vector<std::string>(),
@@ -154,18 +154,18 @@
class LLC : public AbstractInterpreter {
std::string LLCPath; // The path to the LLC executable.
std::vector<std::string> ToolArgs; // Extra args to pass to LLC.
- GCC *gcc;
+ CC *cc;
bool UseIntegratedAssembler;
public:
- LLC(const std::string &llcPath, GCC *Gcc,
+ LLC(const std::string &llcPath, CC *cc,
const std::vector<std::string> *Args,
bool useIntegratedAssembler)
- : LLCPath(llcPath), gcc(Gcc),
+ : LLCPath(llcPath), cc(cc),
UseIntegratedAssembler(useIntegratedAssembler) {
ToolArgs.clear();
if (Args) ToolArgs = *Args;
}
- ~LLC() override { delete gcc; }
+ ~LLC() override { delete cc; }
/// compileProgram - Compile the specified program from bitcode to executable
/// code. This does not produce any output, it is only used when debugging
@@ -178,7 +178,7 @@
const std::string &InputFile,
const std::string &OutputFile,
std::string *Error,
- const std::vector<std::string> &GCCArgs =
+ const std::vector<std::string> &CCArgs =
std::vector<std::string>(),
const std::vector<std::string> &SharedLibs =
std::vector<std::string>(),
@@ -186,10 +186,10 @@
unsigned MemoryLimit = 0) override;
/// OutputCode - Compile the specified program from bitcode to code
- /// understood by the GCC driver (either C or asm). If the code generator
+ /// understood by the CC driver (either C or asm). If the code generator
/// fails, it sets Error, otherwise, this function returns the type of code
/// emitted.
- GCC::FileType OutputCode(const std::string &Bitcode,
+ CC::FileType OutputCode(const std::string &Bitcode,
std::string &OutFile, std::string &Error,
unsigned Timeout = 0,
unsigned MemoryLimit = 0) override;