diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/Driver/Compilation.h | 2 | ||||
-rw-r--r-- | clang/lib/Driver/Compilation.cpp | 9 | ||||
-rw-r--r-- | clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp | 4 | ||||
-rw-r--r-- | clang/tools/libclang/CIndexCodeCompletion.cpp | 1 |
4 files changed, 9 insertions, 7 deletions
diff --git a/clang/include/clang/Driver/Compilation.h b/clang/include/clang/Driver/Compilation.h index 466c86f47d9..3f9bb5aad70 100644 --- a/clang/include/clang/Driver/Compilation.h +++ b/clang/include/clang/Driver/Compilation.h @@ -63,7 +63,7 @@ class Compilation { ArgStringMap FailureResultFiles; /// Redirection for stdout, stderr, etc. - const llvm::sys::Path **Redirects; + const StringRef **Redirects; public: Compilation(const Driver &D, const ToolChain &DefaultToolChain, 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"; } diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp index f79de2909ed..bfd54f5c002 100644 --- a/clang/tools/libclang/CIndexCodeCompletion.cpp +++ b/clang/tools/libclang/CIndexCodeCompletion.cpp @@ -32,6 +32,7 @@ #include "llvm/Support/Atomic.h" #include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/PathV1.h" #include "llvm/Support/Program.h" #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" |