diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 13:54:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 13:54:10 +0000 |
commit | 1fc08f5e9ef733ef1ce6f363fecedc2260e78974 (patch) | |
tree | 19c69a04768629f2d440944b71cbe90adae0b615 /tools/bugpoint/OptimizerDriver.cpp | |
parent | 07637c87f826cdf411f0673595e9bc92ebd793f2 (diff) | |
download | FreeBSD-src-1fc08f5e9ef733ef1ce6f363fecedc2260e78974.zip FreeBSD-src-1fc08f5e9ef733ef1ce6f363fecedc2260e78974.tar.gz |
Vendor import of llvm trunk r154661:
http://llvm.org/svn/llvm-project/llvm/trunk@r154661
Diffstat (limited to 'tools/bugpoint/OptimizerDriver.cpp')
-rw-r--r-- | tools/bugpoint/OptimizerDriver.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp index 336c83d..fb090ee 100644 --- a/tools/bugpoint/OptimizerDriver.cpp +++ b/tools/bugpoint/OptimizerDriver.cpp @@ -85,8 +85,11 @@ void BugDriver::EmitProgressBitcode(const Module *M, if (NoFlyer || PassesToRun.empty()) return; outs() << "\n*** You can reproduce the problem with: "; if (UseValgrind) outs() << "valgrind "; - outs() << "opt " << Filename << " "; - outs() << getPassesString(PassesToRun) << "\n"; + outs() << "opt " << Filename; + for (unsigned i = 0, e = PluginLoader::getNumPlugins(); i != e; ++i) { + outs() << " -load " << PluginLoader::getPlugin(i); + } + outs() << " " << getPassesString(PassesToRun) << "\n"; } cl::opt<bool> SilencePasses("silence-passes", @@ -145,10 +148,9 @@ bool BugDriver::runPasses(Module *Program, return 1; } - sys::Path tool = PrependMainExecutablePath("opt", getToolName(), - (void*)"opt"); + sys::Path tool = sys::Program::FindProgramByName("opt"); if (tool.empty()) { - errs() << "Cannot find `opt' in executable directory!\n"; + errs() << "Cannot find `opt' in PATH!\n"; return 1; } |