#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"
outs() << getPassesString(PassesToRun) << "\n";
}
-cl::opt<bool> SilencePasses("silence-passes", cl::desc("Suppress output of running passes (both stdout and stderr)"));
+cl::opt<bool> SilencePasses("silence-passes",
+ cl::desc("Suppress output of running passes (both stdout and stderr)"));
static cl::list<std::string> OptArgs("opt-args", cl::Positional,
cl::desc("<opt arguments>..."),
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;
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";