[libc-commits] [libc] ae60782 - Revert "[libc] Implement basename and dirname in libgen.h (#204554)" (#204856)

via libc-commits libc-commits at lists.llvm.org
Fri Jun 19 09:39:41 PDT 2026


Author: Jeff Bailey
Date: 2026-06-19T17:39:37+01:00
New Revision: ae60782c82682d20764f888321efb5d53df18a4a

URL: https://github.com/llvm/llvm-project/commit/ae60782c82682d20764f888321efb5d53df18a4a
DIFF: https://github.com/llvm/llvm-project/commit/ae60782c82682d20764f888321efb5d53df18a4a.diff

LOG: Revert "[libc] Implement basename and dirname in libgen.h (#204554)" (#204856)

Reverted due to death tests failing with ASan on buildbots. Reverts
commit 29692c150f86d76cfb58e8bf2c0e97dc6afd2088.

Added: 
    

Modified: 
    libc/config/linux/aarch64/entrypoints.txt
    libc/config/linux/arm/entrypoints.txt
    libc/config/linux/riscv/entrypoints.txt
    libc/config/linux/x86_64/entrypoints.txt
    libc/docs/CMakeLists.txt
    libc/docs/headers/index.rst
    libc/include/CMakeLists.txt
    libc/src/CMakeLists.txt
    libc/src/__support/CPP/string_view.h
    libc/test/src/CMakeLists.txt

Removed: 
    libc/include/libgen.yaml
    libc/src/libgen/CMakeLists.txt
    libc/src/libgen/basename.cpp
    libc/src/libgen/basename.h
    libc/src/libgen/dirname.cpp
    libc/src/libgen/dirname.h
    libc/test/src/libgen/CMakeLists.txt
    libc/test/src/libgen/basename_death_test.cpp
    libc/test/src/libgen/basename_test.cpp
    libc/test/src/libgen/dirname_death_test.cpp
    libc/test/src/libgen/dirname_test.cpp
    libc/utils/docgen/libgen.yaml


################################################################################
diff  --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 3072c3d22aa5f..5cddf3dc89799 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -109,10 +109,6 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.inttypes.strtoimax
     libc.src.inttypes.strtoumax
 
-    # libgen.h entrypoints
-    libc.src.libgen.basename
-    libc.src.libgen.dirname
-
     # stdbit.h entrypoints
     libc.src.stdbit.stdc_bit_ceil_uc
     libc.src.stdbit.stdc_bit_ceil_ui

diff  --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index 805738a3a5756..c4ac53c4925a3 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -73,10 +73,6 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.inttypes.strtoimax
     libc.src.inttypes.strtoumax
 
-    # libgen.h entrypoints
-    libc.src.libgen.basename
-    libc.src.libgen.dirname
-
     # stdbit.h entrypoints
     libc.src.stdbit.stdc_bit_ceil_uc
     libc.src.stdbit.stdc_bit_ceil_ui

diff  --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index bcdcf2320f7bd..a57efbb8e464d 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -109,10 +109,6 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.inttypes.strtoimax
     libc.src.inttypes.strtoumax
 
-    # libgen.h entrypoints
-    libc.src.libgen.basename
-    libc.src.libgen.dirname
-
     # stdbit.h entrypoints
     libc.src.stdbit.stdc_bit_ceil_uc
     libc.src.stdbit.stdc_bit_ceil_ui

diff  --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index f19da5902bba1..ce88a6749d9dc 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -125,10 +125,6 @@ set(TARGET_LIBC_ENTRYPOINTS
     libc.src.inttypes.wcstoimax
     libc.src.inttypes.wcstoumax
 
-    # libgen.h entrypoints
-    libc.src.libgen.basename
-    libc.src.libgen.dirname
-
     # stdbit.h entrypoints
     libc.src.stdbit.stdc_bit_ceil_uc
     libc.src.stdbit.stdc_bit_ceil_ui

diff  --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt
index ded99393f9390..cf54edeae66de 100644
--- a/libc/docs/CMakeLists.txt
+++ b/libc/docs/CMakeLists.txt
@@ -54,7 +54,6 @@ if (SPHINX_FOUND)
       float
       glob
       inttypes
-      libgen
       locale
       nl_types
       net/if

diff  --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst
index 893ddf839cccd..e818e1549c0d1 100644
--- a/libc/docs/headers/index.rst
+++ b/libc/docs/headers/index.rst
@@ -20,7 +20,6 @@ Implementation Status
    float
    glob
    inttypes
-   libgen
    locale
    math/index.rst
    net/if

diff  --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index e8168687109b0..549dbd9e4c3f8 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -130,14 +130,6 @@ add_header_macro(
     .llvm-libc-macros.float_macros
 )
 
-add_header_macro(
-  libgen
-  ../libc/include/libgen.yaml
-  libgen.h
-  DEPENDS
-    .llvm_libc_common_h
-)
-
 add_header_macro(
   limits
   ../libc/include/limits.yaml

diff  --git a/libc/include/libgen.yaml b/libc/include/libgen.yaml
deleted file mode 100644
index c79ab79259be6..0000000000000
--- a/libc/include/libgen.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
-header: libgen.h
-standards:
-  - posix
-macros: []
-types: []
-enums: []
-objects: []
-functions:
-  - name: basename
-    standards:
-      - posix
-    return_type: char *
-    arguments:
-      - type: char *
-  - name: dirname
-    standards:
-      - posix
-    return_type: char *
-    arguments:
-      - type: char *

diff  --git a/libc/src/CMakeLists.txt b/libc/src/CMakeLists.txt
index 56085c9632f59..9db314f54723b 100644
--- a/libc/src/CMakeLists.txt
+++ b/libc/src/CMakeLists.txt
@@ -7,7 +7,6 @@ add_subdirectory(dlfcn)
 add_subdirectory(errno)
 add_subdirectory(fenv)
 add_subdirectory(inttypes)
-add_subdirectory(libgen)
 add_subdirectory(link)
 add_subdirectory(math)
 add_subdirectory(netinet)

diff  --git a/libc/src/__support/CPP/string_view.h b/libc/src/__support/CPP/string_view.h
index 7b98b7e5fb6c8..6991fd46a4ace 100644
--- a/libc/src/__support/CPP/string_view.h
+++ b/libc/src/__support/CPP/string_view.h
@@ -205,15 +205,6 @@ class string_view {
     return npos;
   }
 
-  LIBC_INLINE constexpr size_t find_last_not_of(const char c,
-                                                size_t end = npos) const {
-    end = end >= size() ? size() : end + 1;
-    for (; end > 0; --end)
-      if ((*this)[end - 1] != c)
-        return end - 1;
-    return npos;
-  }
-
   // Finds the first character not equal to c in this view, starting at
   // position From.
   LIBC_INLINE constexpr size_t find_first_not_of(const char c,

diff  --git a/libc/src/libgen/CMakeLists.txt b/libc/src/libgen/CMakeLists.txt
deleted file mode 100644
index 9c315a4e7b41d..0000000000000
--- a/libc/src/libgen/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-add_entrypoint_object(
-  basename
-  SRCS
-    basename.cpp
-  HDRS
-    basename.h
-  DEPENDS
-    libc.src.__support.CPP.string_view
-    libc.src.__support.common
-    libc.src.__support.macros.config
-)
-
-add_entrypoint_object(
-  dirname
-  SRCS
-    dirname.cpp
-  HDRS
-    dirname.h
-  DEPENDS
-    libc.src.__support.CPP.string_view
-    libc.src.__support.common
-    libc.src.__support.macros.config
-)

diff  --git a/libc/src/libgen/basename.cpp b/libc/src/libgen/basename.cpp
deleted file mode 100644
index acf53f2d446e9..0000000000000
--- a/libc/src/libgen/basename.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Implementation of basename.
-///
-//===----------------------------------------------------------------------===//
-
-#include "src/libgen/basename.h"
-#include "src/__support/CPP/string_view.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(char *, basename, (char *path)) {
-  if (path == nullptr || path[0] == '\0')
-    return const_cast<char *>(".");
-
-  cpp::string_view sv(path);
-  size_t last_non_slash = sv.find_last_not_of('/');
-
-  if (last_non_slash == cpp::string_view::npos)
-    return const_cast<char *>("/");
-
-  size_t last_slash = sv.substr(0, last_non_slash).find_last_of('/');
-
-  size_t start = (last_slash == cpp::string_view::npos) ? 0 : last_slash + 1;
-  size_t end = last_non_slash + 1;
-
-  if (end < sv.size())
-    path[end] = '\0';
-
-  return path + start;
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/libgen/basename.h b/libc/src/libgen/basename.h
deleted file mode 100644
index 15239888aa97a..0000000000000
--- a/libc/src/libgen/basename.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Header for basename.
-///
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_LIBGEN_BASENAME_H
-#define LLVM_LIBC_SRC_LIBGEN_BASENAME_H
-
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-/// Return the last component of a pathname.
-///
-/// \param path Pointer to the null-terminated pathname string.
-/// \return Pointer to the last component of path, or "." if path is null or
-/// empty, or "/" if path is all slashes.
-char *basename(char *path);
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_LIBGEN_BASENAME_H

diff  --git a/libc/src/libgen/dirname.cpp b/libc/src/libgen/dirname.cpp
deleted file mode 100644
index 9dd958b63ce9f..0000000000000
--- a/libc/src/libgen/dirname.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Implementation of dirname.
-///
-//===----------------------------------------------------------------------===//
-
-#include "src/libgen/dirname.h"
-#include "src/__support/CPP/string_view.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(char *, dirname, (char *path)) {
-  if (path == nullptr || path[0] == '\0')
-    return const_cast<char *>(".");
-
-  cpp::string_view sv(path);
-  size_t last_non_slash = sv.find_last_not_of('/');
-
-  if (last_non_slash == cpp::string_view::npos)
-    return const_cast<char *>("/");
-
-  size_t last_slash = sv.substr(0, last_non_slash).find_last_of('/');
-
-  if (last_slash == cpp::string_view::npos)
-    return const_cast<char *>(".");
-
-  cpp::string_view dir_sv = sv.substr(0, last_slash);
-  size_t dir_last_non_slash = dir_sv.find_last_not_of('/');
-
-  if (dir_last_non_slash == cpp::string_view::npos) {
-    path[1] = '\0';
-    return path;
-  }
-
-  path[dir_last_non_slash + 1] = '\0';
-  return path;
-}
-
-} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/libgen/dirname.h b/libc/src/libgen/dirname.h
deleted file mode 100644
index 4909b2eb222ad..0000000000000
--- a/libc/src/libgen/dirname.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Header for dirname.
-///
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_LIBGEN_DIRNAME_H
-#define LLVM_LIBC_SRC_LIBGEN_DIRNAME_H
-
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-/// Return the directory component of a pathname.
-///
-/// \param path Pointer to the null-terminated pathname string.
-/// \return Pointer to the directory component of path, or "." if path is null
-/// or empty, or "/" if path is all slashes.
-char *dirname(char *path);
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_LIBGEN_DIRNAME_H

diff  --git a/libc/test/src/CMakeLists.txt b/libc/test/src/CMakeLists.txt
index 45815c9bba8ca..dd232b29a7a7b 100644
--- a/libc/test/src/CMakeLists.txt
+++ b/libc/test/src/CMakeLists.txt
@@ -63,7 +63,6 @@ add_subdirectory(complex)
 add_subdirectory(ctype)
 add_subdirectory(errno)
 add_subdirectory(fenv)
-add_subdirectory(libgen)
 add_subdirectory(link)
 add_subdirectory(math)
 add_subdirectory(netinet)

diff  --git a/libc/test/src/libgen/CMakeLists.txt b/libc/test/src/libgen/CMakeLists.txt
deleted file mode 100644
index d3ee13a9f1cab..0000000000000
--- a/libc/test/src/libgen/CMakeLists.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-add_custom_target(libc-libgen-tests)
-
-add_libc_test(
-  basename_test
-  SUITE
-    libc-libgen-tests
-  SRCS
-    basename_test.cpp
-  DEPENDS
-    libc.src.libgen.basename
-)
-
-add_libc_test(
-  dirname_test
-  SUITE
-    libc-libgen-tests
-  SRCS
-    dirname_test.cpp
-  DEPENDS
-    libc.src.libgen.dirname
-)
-
-add_libc_test(
-  basename_death_test
-  UNIT_TEST_ONLY
-  SUITE
-    libc-libgen-tests
-  SRCS
-    basename_death_test.cpp
-  DEPENDS
-    libc.src.libgen.basename
-)
-
-add_libc_test(
-  dirname_death_test
-  UNIT_TEST_ONLY
-  SUITE
-    libc-libgen-tests
-  SRCS
-    dirname_death_test.cpp
-  DEPENDS
-    libc.src.libgen.dirname
-)

diff  --git a/libc/test/src/libgen/basename_death_test.cpp b/libc/test/src/libgen/basename_death_test.cpp
deleted file mode 100644
index 24100dc48aa1b..0000000000000
--- a/libc/test/src/libgen/basename_death_test.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Death tests for basename.
-///
-//===----------------------------------------------------------------------===//
-
-#include "src/libgen/basename.h"
-#include "test/UnitTest/Test.h"
-
-#ifdef ENABLE_SUBPROCESS_TESTS
-TEST(LlvmLibcBasenameTest, ModifyReturnValue) {
-  char *r = LIBC_NAMESPACE::basename(nullptr);
-  ASSERT_DEATH([r]() { r[0] = 'a'; }, WITH_SIGNAL(-1));
-}
-#endif

diff  --git a/libc/test/src/libgen/basename_test.cpp b/libc/test/src/libgen/basename_test.cpp
deleted file mode 100644
index 2e8feef715137..0000000000000
--- a/libc/test/src/libgen/basename_test.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Unittests for basename.
-///
-//===----------------------------------------------------------------------===//
-
-#include "src/libgen/basename.h"
-#include "test/UnitTest/Test.h"
-
-TEST(LlvmLibcBasenameTest, NullPointer) {
-  ASSERT_STREQ(LIBC_NAMESPACE::basename(nullptr), ".");
-}
-
-TEST(LlvmLibcBasenameTest, EmptyString) {
-  char path[] = "";
-  ASSERT_STREQ(LIBC_NAMESPACE::basename(path), ".");
-}
-
-TEST(LlvmLibcBasenameTest, RegularPath) {
-  char path[] = "/usr/lib";
-  ASSERT_STREQ(LIBC_NAMESPACE::basename(path), "lib");
-}
-
-TEST(LlvmLibcBasenameTest, TrailingSlash) {
-  char path[] = "/usr/";
-  ASSERT_STREQ(LIBC_NAMESPACE::basename(path), "usr");
-  ASSERT_STREQ(path, "/usr");
-}
-
-TEST(LlvmLibcBasenameTest, SingleSlash) {
-  char path[] = "/";
-  ASSERT_STREQ(LIBC_NAMESPACE::basename(path), "/");
-}
-
-TEST(LlvmLibcBasenameTest, MultipleSlashes) {
-  char path[] = "///";
-  ASSERT_STREQ(LIBC_NAMESPACE::basename(path), "/");
-}
-
-TEST(LlvmLibcBasenameTest, SimpleName) {
-  char path[] = "a";
-  ASSERT_STREQ(LIBC_NAMESPACE::basename(path), "a");
-}
-
-TEST(LlvmLibcBasenameTest, SimpleNameTrailingSlash) {
-  char path[] = "a/";
-  ASSERT_STREQ(LIBC_NAMESPACE::basename(path), "a");
-  ASSERT_STREQ(path, "a");
-}
-
-TEST(LlvmLibcBasenameTest, ComplexPath) {
-  char path[] = "///a///";
-  ASSERT_STREQ(LIBC_NAMESPACE::basename(path), "a");
-  ASSERT_STREQ(path, "///a");
-}

diff  --git a/libc/test/src/libgen/dirname_death_test.cpp b/libc/test/src/libgen/dirname_death_test.cpp
deleted file mode 100644
index e135a4ce60cd6..0000000000000
--- a/libc/test/src/libgen/dirname_death_test.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Death tests for dirname.
-///
-//===----------------------------------------------------------------------===//
-
-#include "src/libgen/dirname.h"
-#include "test/UnitTest/Test.h"
-
-#ifdef ENABLE_SUBPROCESS_TESTS
-TEST(LlvmLibcDirnameTest, ModifyReturnValue) {
-  char *r = LIBC_NAMESPACE::dirname(nullptr);
-  ASSERT_DEATH([r]() { r[0] = 'a'; }, WITH_SIGNAL(-1));
-}
-#endif

diff  --git a/libc/test/src/libgen/dirname_test.cpp b/libc/test/src/libgen/dirname_test.cpp
deleted file mode 100644
index afd718fb6e559..0000000000000
--- a/libc/test/src/libgen/dirname_test.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Unittests for dirname.
-///
-//===----------------------------------------------------------------------===//
-
-#include "src/libgen/dirname.h"
-#include "test/UnitTest/Test.h"
-
-TEST(LlvmLibcDirnameTest, NullPointer) {
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(nullptr), ".");
-}
-
-TEST(LlvmLibcDirnameTest, EmptyString) {
-  char path[] = "";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), ".");
-}
-
-TEST(LlvmLibcDirnameTest, RegularPath) {
-  char path[] = "/usr/lib";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), "/usr");
-  ASSERT_STREQ(path, "/usr");
-}
-
-TEST(LlvmLibcDirnameTest, TrailingSlash) {
-  char path[] = "/usr/";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), "/");
-  ASSERT_STREQ(path, "/");
-}
-
-TEST(LlvmLibcDirnameTest, SingleSlash) {
-  char path[] = "/";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), "/");
-}
-
-TEST(LlvmLibcDirnameTest, MultipleSlashes) {
-  char path[] = "///";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), "/");
-}
-
-TEST(LlvmLibcDirnameTest, SimpleName) {
-  char path[] = "a";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), ".");
-}
-
-TEST(LlvmLibcDirnameTest, SimpleNameTrailingSlash) {
-  char path[] = "a/";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), ".");
-}
-
-TEST(LlvmLibcDirnameTest, ComplexPath) {
-  char path[] = "///a///b///";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), "///a");
-  ASSERT_STREQ(path, "///a");
-}
-
-TEST(LlvmLibcDirnameTest, SlashA) {
-  char path[] = "/a";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), "/");
-  ASSERT_STREQ(path, "/");
-}
-
-TEST(LlvmLibcDirnameTest, MultipleSlashesA) {
-  char path[] = "///a";
-  ASSERT_STREQ(LIBC_NAMESPACE::dirname(path), "/");
-  ASSERT_STREQ(path, "/");
-}

diff  --git a/libc/utils/docgen/libgen.yaml b/libc/utils/docgen/libgen.yaml
deleted file mode 100644
index 07aad5f1be55c..0000000000000
--- a/libc/utils/docgen/libgen.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-functions:
-  basename:
-    in-latest-posix: ''
-  dirname:
-    in-latest-posix: ''


        


More information about the libc-commits mailing list