X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=unittests%2FSupport%2FProgramTest.cpp;h=6852ca616e08aa9d48af8d244c25e1117ade8205;hb=7172b38af7ed5d1c1e2c97fadfb0ae0c19aff816;hp=1cf53d50b0241b8f932fa08acf7183ead04bd7cd;hpb=675e0ac0bfd6fb78423d9fbee9f50c1dec62c111;p=oota-llvm.git diff --git a/unittests/Support/ProgramTest.cpp b/unittests/Support/ProgramTest.cpp index 1cf53d50b02..6852ca616e0 100644 --- a/unittests/Support/ProgramTest.cpp +++ b/unittests/Support/ProgramTest.cpp @@ -8,8 +8,8 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" -#include "llvm/Support/PathV1.h" #include "llvm/Support/Program.h" #include "gtest/gtest.h" @@ -56,7 +56,8 @@ TEST(ProgramTest, CreateProcessTrailingSlash) { exit(1); } - Path my_exe = Path::GetMainExecutable(TestMainArgv0, &ProgramTestStringArg1); + std::string my_exe = + sys::fs::getMainExecutable(TestMainArgv0, &ProgramTestStringArg1); const char *argv[] = { my_exe.c_str(), "--gtest_filter=ProgramTest.CreateProcessTrailingSlashChild", @@ -80,7 +81,7 @@ TEST(ProgramTest, CreateProcessTrailingSlash) { StringRef nul("/dev/null"); #endif const StringRef *redirects[] = { &nul, &nul, 0 }; - int rc = ExecuteAndWait(my_exe.str(), argv, &envp[0], redirects, + int rc = ExecuteAndWait(my_exe, argv, &envp[0], redirects, /*secondsToWait=*/ 10, /*memoryLimit=*/ 0, &error, &ExecutionFailed); EXPECT_FALSE(ExecutionFailed) << error;