Update for llvm change.

llvm-svn: 183930
This commit is contained in:
Rafael Espindola 2013-06-13 19:25:45 +00:00
parent ff89ff297f
commit 0725a7d972
2 changed files with 5 additions and 4 deletions

View File

@ -769,13 +769,14 @@ UbigraphViz::~UbigraphViz() {
Out.reset(0); Out.reset(0);
llvm::errs() << "Running 'ubiviz' program... "; llvm::errs() << "Running 'ubiviz' program... ";
std::string ErrMsg; std::string ErrMsg;
llvm::sys::Path Ubiviz = llvm::sys::FindProgramByName("ubiviz"); std::string Ubiviz = llvm::sys::FindProgramByName("ubiviz");
std::vector<const char*> args; std::vector<const char*> args;
args.push_back(Ubiviz.c_str()); args.push_back(Ubiviz.c_str());
args.push_back(Filename.c_str()); args.push_back(Filename.c_str());
args.push_back(0); 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"; llvm::errs() << "Error viewing graph: " << ErrMsg << "\n";
} }

View File

@ -434,10 +434,10 @@ int main(int argc_, const char **argv_) {
// Do a PATH lookup, if there are no directory components. // Do a PATH lookup, if there are no directory components.
if (llvm::sys::path::filename(InstalledPath) == InstalledPath) { 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())); llvm::sys::path::filename(InstalledPath.str()));
if (!Tmp.empty()) if (!Tmp.empty())
InstalledPath = Tmp.str(); InstalledPath = Tmp;
} }
llvm::sys::fs::make_absolute(InstalledPath); llvm::sys::fs::make_absolute(InstalledPath);
InstalledPath = llvm::sys::path::parent_path(InstalledPath); InstalledPath = llvm::sys::path::parent_path(InstalledPath);