[libc-commits] [PATCH] D82113: Add strcmp to libc.

Chris Gyurgyik via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jun 18 10:55:33 PDT 2020


cgyurgyik created this revision.
Herald added subscribers: libc-commits, mgorny.
Herald added a project: libc-project.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82113

Files:
  libc/src/string/CMakeLists.txt
  libc/test/src/string/CMakeLists.txt


Index: libc/test/src/string/CMakeLists.txt
===================================================================
--- libc/test/src/string/CMakeLists.txt
+++ libc/test/src/string/CMakeLists.txt
@@ -32,6 +32,16 @@
     libc.src.string.strlen
 )
 
+add_libc_unittest(
+  strcmp_test
+  SUITE
+    libc_string_unittests
+  SRCS
+    strcmp_test.cpp
+  DEPENDS
+    libc.src.string.strcmp
+)
+
 # Tests all implementations that can run on the host.
 function(add_libc_multi_impl_test name)
   get_property(fq_implementations GLOBAL PROPERTY ${name}_implementations)
Index: libc/src/string/CMakeLists.txt
===================================================================
--- libc/src/string/CMakeLists.txt
+++ libc/src/string/CMakeLists.txt
@@ -34,6 +34,16 @@
     libc.include.string
 )
 
+add_entrypoint_object(
+  strcmp
+  SRCS
+    strcmp.cpp
+  HDRS
+    strcmp.h
+  DEPENDS
+    libc.include.string
+)
+
 # Helper to define a function with multiple implementations
 # - Computes flags to satisfy required/rejected features and arch,
 # - Declares an entry point,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82113.271777.patch
Type: text/x-patch
Size: 1064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200618/2aa7d78a/attachment.bin>


More information about the libc-commits mailing list