[libc-commits] [libc] 9698265 - [libc] Add comparison specialization for cpp:string type
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Thu May 18 13:25:00 PDT 2023
Author: Joseph Huber
Date: 2023-05-18T15:24:00-05:00
New Revision: 9698265e449b3ed84d833b3840f6847ab6d8b971
URL: https://github.com/llvm/llvm-project/commit/9698265e449b3ed84d833b3840f6847ab6d8b971
DIFF: https://github.com/llvm/llvm-project/commit/9698265e449b3ed84d833b3840f6847ab6d8b971.diff
LOG: [libc] Add comparison specialization for cpp:string type
We compare this type in the string_test. It had no specialization here
so it could cause linker errors. This patch simply extends the interface
to support it.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D150904
Added:
Modified:
libc/test/UnitTest/LibcTest.cpp
Removed:
################################################################################
diff --git a/libc/test/UnitTest/LibcTest.cpp b/libc/test/UnitTest/LibcTest.cpp
index dabfe2b6bd8a0..ac67b997a9f2f 100644
--- a/libc/test/UnitTest/LibcTest.cpp
+++ b/libc/test/UnitTest/LibcTest.cpp
@@ -285,6 +285,11 @@ template bool test<__llvm_libc::cpp::string_view>(
__llvm_libc::cpp::string_view RHS, const char *LHSStr, const char *RHSStr,
const char *File, unsigned long Line);
+template bool test<__llvm_libc::cpp::string>(
+ RunContext *Ctx, TestCondition Cond, __llvm_libc::cpp::string LHS,
+ __llvm_libc::cpp::string RHS, const char *LHSStr, const char *RHSStr,
+ const char *File, unsigned long Line);
+
} // namespace internal
bool Test::testStrEq(const char *LHS, const char *RHS, const char *LHSStr,
More information about the libc-commits
mailing list