summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-13 20:25:38 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-13 20:25:38 +0000
commit675e0ac0bfd6fb78423d9fbee9f50c1dec62c111 (patch)
treef5a9c3b5ad5e0bccc3366b4ea705d4cf9195473c /unittests
parent11729224bf93d61ca6c31c02bfe4f1b171f8a4a7 (diff)
downloadllvm-675e0ac0bfd6fb78423d9fbee9f50c1dec62c111.tar.gz
llvm-675e0ac0bfd6fb78423d9fbee9f50c1dec62c111.tar.bz2
llvm-675e0ac0bfd6fb78423d9fbee9f50c1dec62c111.tar.xz
Avoid using PathV1.h in Program.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/ProgramTest.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/unittests/Support/ProgramTest.cpp b/unittests/Support/ProgramTest.cpp
index f132c03304..1cf53d50b0 100644
--- a/unittests/Support/ProgramTest.cpp
+++ b/unittests/Support/ProgramTest.cpp
@@ -9,6 +9,7 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Path.h"
+#include "llvm/Support/PathV1.h"
#include "llvm/Support/Program.h"
#include "gtest/gtest.h"
@@ -74,14 +75,14 @@ TEST(ProgramTest, CreateProcessTrailingSlash) {
bool ExecutionFailed;
// Redirect stdout and stdin to NUL, but let stderr through.
#ifdef LLVM_ON_WIN32
- Path nul("NUL");
+ StringRef nul("NUL");
#else
- Path nul("/dev/null");
+ StringRef nul("/dev/null");
#endif
- const Path *redirects[] = { &nul, &nul, 0 };
- int rc =
- ExecuteAndWait(my_exe, argv, &envp[0], redirects, /*secondsToWait=*/ 10,
- /*memoryLimit=*/ 0, &error, &ExecutionFailed);
+ const StringRef *redirects[] = { &nul, &nul, 0 };
+ int rc = ExecuteAndWait(my_exe.str(), argv, &envp[0], redirects,
+ /*secondsToWait=*/ 10, /*memoryLimit=*/ 0, &error,
+ &ExecutionFailed);
EXPECT_FALSE(ExecutionFailed) << error;
EXPECT_EQ(0, rc);
}