forked from OSchip/llvm-project
parent
ff89ff297f
commit
0725a7d972
|
@ -769,13 +769,14 @@ UbigraphViz::~UbigraphViz() {
|
|||
Out.reset(0);
|
||||
llvm::errs() << "Running 'ubiviz' program... ";
|
||||
std::string ErrMsg;
|
||||
llvm::sys::Path Ubiviz = llvm::sys::FindProgramByName("ubiviz");
|
||||
std::string Ubiviz = llvm::sys::FindProgramByName("ubiviz");
|
||||
std::vector<const char*> args;
|
||||
args.push_back(Ubiviz.c_str());
|
||||
args.push_back(Filename.c_str());
|
||||
args.push_back(0);
|
||||
|
||||
if (llvm::sys::ExecuteAndWait(Ubiviz, &args[0],0,0,0,0,&ErrMsg)) {
|
||||
if (llvm::sys::ExecuteAndWait(llvm::sys::Path(Ubiviz), &args[0], 0, 0, 0, 0,
|
||||
&ErrMsg)) {
|
||||
llvm::errs() << "Error viewing graph: " << ErrMsg << "\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -434,10 +434,10 @@ int main(int argc_, const char **argv_) {
|
|||
|
||||
// Do a PATH lookup, if there are no directory components.
|
||||
if (llvm::sys::path::filename(InstalledPath) == InstalledPath) {
|
||||
llvm::sys::Path Tmp = llvm::sys::FindProgramByName(
|
||||
std::string Tmp = llvm::sys::FindProgramByName(
|
||||
llvm::sys::path::filename(InstalledPath.str()));
|
||||
if (!Tmp.empty())
|
||||
InstalledPath = Tmp.str();
|
||||
InstalledPath = Tmp;
|
||||
}
|
||||
llvm::sys::fs::make_absolute(InstalledPath);
|
||||
InstalledPath = llvm::sys::path::parent_path(InstalledPath);
|
||||
|
|
Loading…
Reference in New Issue