summaryrefslogtreecommitdiff
path: root/unittests/ADT/StringSwitchTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ADT/StringSwitchTest.cpp')
-rw-r--r--unittests/ADT/StringSwitchTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/unittests/ADT/StringSwitchTest.cpp b/unittests/ADT/StringSwitchTest.cpp
index 1a51629ca574..62d3a319e7a4 100644
--- a/unittests/ADT/StringSwitchTest.cpp
+++ b/unittests/ADT/StringSwitchTest.cpp
@@ -158,7 +158,8 @@ TEST(StringSwitchTest, Cases) {
auto Translate = [](StringRef S) {
return llvm::StringSwitch<OSType>(S)
- .Cases("wind\0ws", "win32", "winnt", OSType::Windows)
+ .Cases(StringLiteral::withInnerNUL("wind\0ws"), "win32", "winnt",
+ OSType::Windows)
.Cases("linux", "unix", "*nix", "posix", OSType::Linux)
.Default(OSType::Unknown);
};
@@ -184,7 +185,8 @@ TEST(StringSwitchTest, CasesLower) {
auto Translate = [](StringRef S) {
return llvm::StringSwitch<OSType>(S)
- .CasesLower("wind\0ws", "win32", "winnt", OSType::Windows)
+ .CasesLower(StringLiteral::withInnerNUL("wind\0ws"), "win32", "winnt",
+ OSType::Windows)
.CasesLower("linux", "unix", "*nix", "posix", OSType::Linux)
.Default(OSType::Unknown);
};