MSVC 2012 doesn't support std::initializer_list at all, so don't rely on

that std::vector constructor.

llvm-svn: 202684
This commit is contained in:
Peter Collingbourne 2014-03-03 08:13:06 +00:00
parent 1594c15500
commit f93725459a
1 changed files with 6 additions and 2 deletions

View File

@ -240,8 +240,12 @@ TEST(runToolOnCodeWithArgs, TestNoDepFile) {
llvm::SmallString<32> DepFilePath;
ASSERT_FALSE(
llvm::sys::fs::createTemporaryFile("depfile", "d", DepFilePath));
std::vector<std::string> Args = { "-MMD", "-MT", DepFilePath.str(), "-MF",
DepFilePath.str() };
std::vector<std::string> Args;
Args.push_back("-MMD");
Args.push_back("-MT");
Args.push_back(DepFilePath.str());
Args.push_back("-MF");
Args.push_back(DepFilePath.str());
EXPECT_TRUE(runToolOnCodeWithArgs(new SkipBodyAction, "", Args));
EXPECT_FALSE(llvm::sys::fs::exists(DepFilePath.str()));
EXPECT_FALSE(llvm::sys::fs::remove(DepFilePath.str()));