[PATCH] D13642: [Bugpoint] Allow fallback to clang
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 12:50:11 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250318: [Bugpoint] Use clang by default. (authored by davide).
Changed prior to commit:
http://reviews.llvm.org/D13642?vs=37305&id=37375#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13642
Files:
llvm/trunk/tools/bugpoint/ExecutionDriver.cpp
Index: llvm/trunk/tools/bugpoint/ExecutionDriver.cpp
===================================================================
--- llvm/trunk/tools/bugpoint/ExecutionDriver.cpp
+++ llvm/trunk/tools/bugpoint/ExecutionDriver.cpp
@@ -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 @@
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 @@
SafeInterpreter = nullptr;
std::string Message;
+ if (GCCBinary.empty()) {
+ if (sys::findProgramByName("clang"))
+ GCCBinary = "clang";
+ else
+ GCCBinary = "gcc";
+ }
+
switch (InterpreterSel) {
case AutoPick:
if (!Interpreter) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13642.37375.patch
Type: text/x-patch
Size: 1129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151014/0fc5526f/attachment.bin>
More information about the llvm-commits
mailing list