X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=tools%2Fbugpoint%2FOptimizerDriver.cpp;h=336c83d7b1f39bd864a075624c9fdc6547ea4c97;hb=adf01b3f18442ae8db6b8948e70d82d9df415119;hp=d28ce79877a5e761c84a3439a6cc4b00c552532a;hpb=544fba13628e022cd3c5be8bbb22b81f0f6b0fa3;p=oota-llvm.git diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp index d28ce79877a..336c83d7b1f 100644 --- a/tools/bugpoint/OptimizerDriver.cpp +++ b/tools/bugpoint/OptimizerDriver.cpp @@ -26,8 +26,8 @@ #include "llvm/Support/SystemUtils.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ToolOutputFile.h" -#include "llvm/System/Path.h" -#include "llvm/System/Program.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/Program.h" #define DONT_GET_PLUGIN_LOADER_OPTION #include "llvm/Support/PluginLoader.h" @@ -89,7 +89,8 @@ void BugDriver::EmitProgressBitcode(const Module *M, outs() << getPassesString(PassesToRun) << "\n"; } -cl::opt SilencePasses("silence-passes", cl::desc("Suppress output of running passes (both stdout and stderr)")); +cl::opt SilencePasses("silence-passes", + cl::desc("Suppress output of running passes (both stdout and stderr)")); static cl::list OptArgs("opt-args", cl::Positional, cl::desc("..."), @@ -144,7 +145,8 @@ bool BugDriver::runPasses(Module *Program, return 1; } - sys::Path tool = FindExecutable("opt", getToolName(), (void*)"opt"); + sys::Path tool = PrependMainExecutablePath("opt", getToolName(), + (void*)"opt"); if (tool.empty()) { errs() << "Cannot find `opt' in executable directory!\n"; return 1; @@ -221,7 +223,7 @@ bool BugDriver::runPasses(Module *Program, if (result == -1) outs() << "Execute failed: " << ErrMsg << "\n"; else - outs() << "Crashed with signal #" << abs(result) << "\n"; + outs() << "Crashed: " << ErrMsg << "\n"; } if (result & 0x01000000) outs() << "Dumped core\n";