From 0725a7d9729b821b0184c237d12d507996d9a008 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 13 Jun 2013 19:25:45 +0000 Subject: [PATCH] Update for llvm change. llvm-svn: 183930 --- clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp | 5 +++-- clang/tools/driver/driver.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp index d67d60396069..635e3fc006f9 100644 --- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -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 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"; } diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp index b3c301cefdc0..7397667e0891 100644 --- a/clang/tools/driver/driver.cpp +++ b/clang/tools/driver/driver.cpp @@ -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);