aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/StringRefTest.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-01-27 05:24:39 +0000
committerAlp Toker <alp@nuanti.com>2014-01-27 05:24:39 +0000
commit17d4e98e7308922d6cbf24a577367dca75d3920e (patch)
tree230c7800a25a1a46d4cd91d4235ccdde6bc8ba27 /llvm/unittests/ADT/StringRefTest.cpp
parent0d865d3d7beb04ab0f634a711a785156e25771aa (diff)
downloadllvm-17d4e98e7308922d6cbf24a577367dca75d3920e.zip
llvm-17d4e98e7308922d6cbf24a577367dca75d3920e.tar.gz
llvm-17d4e98e7308922d6cbf24a577367dca75d3920e.tar.bz2
Roll back the ConstStringRef change for now
There are a couple of interesting things here that we want to check over (particularly the expecting asserts in StringRef) and get right for general use in ADT so hold back on this one. For clang we have a workable templated solution to use in the meanwhile. This reverts commit r200187. llvm-svn: 200194
Diffstat (limited to 'llvm/unittests/ADT/StringRefTest.cpp')
-rw-r--r--llvm/unittests/ADT/StringRefTest.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/unittests/ADT/StringRefTest.cpp b/llvm/unittests/ADT/StringRefTest.cpp
index b240a87..0ab8fcf 100644
--- a/llvm/unittests/ADT/StringRefTest.cpp
+++ b/llvm/unittests/ADT/StringRefTest.cpp
@@ -531,22 +531,4 @@ TEST(StringRefTest, joinStrings) {
EXPECT_TRUE(v2_join3);
}
-static void fn_stringref(StringRef str) {
- EXPECT_TRUE(str == "hello");
-}
-static void fn_conststringref(ConstStringRef str) {
- fn_stringref(str);
-}
-
-TEST(StringRefTest, constStringRef) {
- LLVM_CONSTEXPR ConstStringRef csr("hello");
-#if __has_feature(cxx_constexpr) || defined(__GXX_EXPERIMENTAL_CXX0X__)
- LLVM_STATIC_ASSERT(csr[0] != csr[1], "");
- LLVM_STATIC_ASSERT(csr[2] == csr[3], "");
- LLVM_STATIC_ASSERT(csr.size() == 5, "");
-#endif
- llvm_expect(csr[2] == csr[3]);
- fn_conststringref(csr);
-}
-
} // end anonymous namespace