diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-13 20:08:52 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-13 20:08:52 +0000 |
| commit | cb4bb19070183520fb256781f1a07f6d11acbe41 (patch) | |
| tree | 5157afe682b258d209fbb1c3aaca8916de9c0c61 /clang/lib | |
| parent | 6828fe475a2aaa538e368b977d438be1cbedc4d7 (diff) | |
| download | bcm5719-llvm-cb4bb19070183520fb256781f1a07f6d11acbe41.tar.gz bcm5719-llvm-cb4bb19070183520fb256781f1a07f6d11acbe41.zip | |
Use the sys::ExecuteAndWait that takes StringRefs.
Also don't depend on Program.h including PathV1.h.
llvm-svn: 183935
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Driver/Compilation.cpp | 9 | ||||
| -rw-r--r-- | clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp index bc1a75a44ab..1ab47f3bbf8 100644 --- a/clang/lib/Driver/Compilation.cpp +++ b/clang/lib/Driver/Compilation.cpp @@ -291,7 +291,7 @@ int Compilation::ExecuteCommand(const Command &C, std::string Error; bool ExecutionFailed; - int Res = llvm::sys::ExecuteAndWait(Prog, Argv, /*env*/ 0, Redirects, + int Res = llvm::sys::ExecuteAndWait(Prog.str(), Argv, /*env*/ 0, Redirects, /*secondsToWait*/ 0, /*memoryLimit*/ 0, &Error, &ExecutionFailed); if (!Error.empty()) { @@ -368,9 +368,10 @@ void Compilation::initCompilationForDiagnostics() { TranslatedArgs->ClaimAllArgs(); // Redirect stdout/stderr to /dev/null. - Redirects = new const llvm::sys::Path*[3](); - Redirects[1] = new const llvm::sys::Path(); - Redirects[2] = new const llvm::sys::Path(); + Redirects = new const StringRef*[3](); + Redirects[0] = 0; + Redirects[1] = new const StringRef(); + Redirects[2] = new const StringRef(); } StringRef Compilation::getSysRoot() const { diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp index 635e3fc006f..edea27bd8ea 100644 --- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -41,6 +41,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/Path.h" +#include "llvm/Support/PathV1.h" #include "llvm/Support/Program.h" #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" @@ -775,8 +776,7 @@ UbigraphViz::~UbigraphViz() { args.push_back(Filename.c_str()); args.push_back(0); - if (llvm::sys::ExecuteAndWait(llvm::sys::Path(Ubiviz), &args[0], 0, 0, 0, 0, - &ErrMsg)) { + if (llvm::sys::ExecuteAndWait(Ubiviz, &args[0], 0, 0, 0, 0, &ErrMsg)) { llvm::errs() << "Error viewing graph: " << ErrMsg << "\n"; } |

