summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/Path.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-17 00:16:21 +0000
committerZachary Turner <zturner@google.com>2017-03-17 00:16:21 +0000
commit8fb09e3ea7d5df3c8ce5e1ddcad13f4d9d383e32 (patch)
tree18630e29c1cce64af9d208d6a399626710f42f8f /llvm/unittests/Support/Path.cpp
parent2ed2aa75bffa6596bffbf843fb8589d56f4c913e (diff)
downloadbcm5719-llvm-8fb09e3ea7d5df3c8ce5e1ddcad13f4d9d383e32.tar.gz
bcm5719-llvm-8fb09e3ea7d5df3c8ce5e1ddcad13f4d9d383e32.zip
Don't rely on an implicit std::tuple constructor.
Apparently it doesn't have one, so using an initializer list doesn't work correctly. llvm-svn: 298018
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r--llvm/unittests/Support/Path.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index cfd448b5fc9..042cd1eef08 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -1054,10 +1054,15 @@ TEST_F(FileSystemTest, FileMapping) {
}
TEST(Support, NormalizePath) {
- using TestTuple = std::tuple<StringRef, StringRef, StringRef>;
- TestTuple Tests[] = {{"a", "a", "a"}, {"a/b", "a\\b", "a/b"},
- {"a\\b", "a\\b", "a/b"}, {"a\\\\b", "a\\\\b", "a\\\\b"},
- {"\\a", "\\a", "/a"}, {"a\\", "a\\", "a/"}};
+ using TestTuple = std::tuple<const char *, const char *, const char *>;
+ std::vector<TestTuple> Tests;
+ Tests.emplace_back("a", "a", "a");
+ Tests.emplace_back("a/b", "a\\b", "a/b");
+ Tests.emplace_back("a\\b", "a\\b", "a/b");
+ Tests.emplace_back("a\\\\b", "a\\\\b", "a\\\\b");
+ Tests.emplace_back("\\a", "\\a", "/a");
+ Tests.emplace_back("a\\", "a\\", "a/");
+
for (auto &T : Tests) {
SmallString<64> Win = std::get<0>(T);
SmallString<64> Posix = Win;
OpenPOWER on IntegriCloud