1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[Bugpoint] Use clang by default.

We now rely on gcc only if either of the following is true:
1) -gcc option is passed by the user
2) clang is not found in the default path.

Differential Revision:	 http://reviews.llvm.org/D13642

llvm-svn: 250318
This commit is contained in:
Davide Italiano 2015-10-14 19:48:01 +00:00
parent fecbc60363
commit b2aad5775a

View File

@ -17,6 +17,7 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/SystemUtils.h"
#include "llvm/Support/raw_ostream.h"
#include <fstream>
@ -124,8 +125,7 @@ namespace {
cl::ZeroOrMore, cl::PositionalEatsArgs);
cl::opt<std::string>
GCCBinary("gcc", cl::init("gcc"),
cl::desc("The gcc binary to use. (default 'gcc')"));
GCCBinary("gcc", cl::init(""), cl::desc("The gcc binary to use."));
cl::list<std::string>
GCCToolArgv("gcc-tool-args", cl::Positional,
@ -148,6 +148,13 @@ bool BugDriver::initializeExecutionEnvironment() {
SafeInterpreter = nullptr;
std::string Message;
if (GCCBinary.empty()) {
if (sys::findProgramByName("clang"))
GCCBinary = "clang";
else
GCCBinary = "gcc";
}
switch (InterpreterSel) {
case AutoPick:
if (!Interpreter) {