[libc-commits] [PATCH] D150904: [libc] Add comparison specialization for cpp:string type

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu May 18 13:20:59 PDT 2023


jhuber6 created this revision.
jhuber6 added a reviewer: sivachandra.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150904

Files:
  libc/test/UnitTest/LibcTest.cpp


Index: libc/test/UnitTest/LibcTest.cpp
===================================================================
--- libc/test/UnitTest/LibcTest.cpp
+++ libc/test/UnitTest/LibcTest.cpp
@@ -285,6 +285,11 @@
     __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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150904.523532.patch
Type: text/x-patch
Size: 669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230518/d3f47bff/attachment.bin>


More information about the libc-commits mailing list