[llvm-branch-commits] [libc] f22c705 - address CR

Schrodinger ZHU Yifan via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri May 10 11:00:12 PDT 2024


Author: Schrodinger ZHU Yifan
Date: 2024-05-10T14:00:06-04:00
New Revision: f22c705484a0c4af5810803ee62b47beb44dc73c

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

LOG: address CR

Added: 
    

Modified: 
    libc/src/__support/time/CMakeLists.txt
    libc/src/time/linux/CMakeLists.txt
    libc/src/time/linux/clock.cpp
    libc/src/time/linux/clock_gettime.cpp
    libc/src/time/linux/gettimeofday.cpp
    libc/src/time/linux/time.cpp

Removed: 
    libc/src/__support/time/clock_gettime.h


################################################################################
diff  --git a/libc/src/__support/time/CMakeLists.txt b/libc/src/__support/time/CMakeLists.txt
index e934ef7b9224a..89ddffb099388 100644
--- a/libc/src/__support/time/CMakeLists.txt
+++ b/libc/src/__support/time/CMakeLists.txt
@@ -2,14 +2,6 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
   add_subdirectory(${LIBC_TARGET_OS})
 endif()
 
-add_header_library(
-  clock_gettime
-  HDRS
-    clock_gettime.h
-  DEPENDS
-    .${LIBC_TARGET_OS}.clock_gettime
-)
-
 add_header_library(
   units
   HDRS

diff  --git a/libc/src/__support/time/clock_gettime.h b/libc/src/__support/time/clock_gettime.h
deleted file mode 100644
index ef99339a4805e..0000000000000
--- a/libc/src/__support/time/clock_gettime.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===--- clock_gettime internal implementation ------------------*- C++ -*-===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC___SUPPORT_TIME_CLOCK_GETTIME_H
-#define LLVM_LIBC_SRC___SUPPORT_TIME_CLOCK_GETTIME_H
-
-#ifdef __linux__
-#include "src/__support/time/linux/clock_gettime.h"
-#else
-#error "clock_gettime is not supported on this platform"
-#endif
-
-#endif // LLVM_LIBC_SRC___SUPPORT_TIME_CLOCK_GETTIME_H

diff  --git a/libc/src/time/linux/CMakeLists.txt b/libc/src/time/linux/CMakeLists.txt
index 8a0e6b04b66e6..c15fb44ad5d12 100644
--- a/libc/src/time/linux/CMakeLists.txt
+++ b/libc/src/time/linux/CMakeLists.txt
@@ -7,7 +7,7 @@ add_entrypoint_object(
   DEPENDS
     libc.hdr.time_macros
     libc.hdr.types.time_t
-    libc.src.__support.time.clock_gettime
+    libc.src.__support.time.linux.clock_gettime
     libc.src.errno.errno
 )
 
@@ -21,7 +21,7 @@ add_entrypoint_object(
     libc.hdr.time_macros
     libc.hdr.types.clock_t
     libc.src.__support.time.units
-    libc.src.__support.time.clock_gettime
+    libc.src.__support.time.linux.clock_gettime
     libc.src.__support.CPP.limits
     libc.src.errno.errno
 )
@@ -49,7 +49,7 @@ add_entrypoint_object(
   DEPENDS
     libc.hdr.types.clockid_t
     libc.hdr.types.struct_timespec
-    libc.src.__support.time.clock_gettime
+    libc.src.__support.time.linux.clock_gettime
     libc.src.errno.errno
 )
 
@@ -62,7 +62,7 @@ add_entrypoint_object(
   DEPENDS
     libc.hdr.time_macros
     libc.hdr.types.suseconds_t
-    libc.src.__support.time.clock_gettime
+    libc.src.__support.time.linux.clock_gettime
     libc.src.__support.time.units
     libc.src.errno.errno
 )

diff  --git a/libc/src/time/linux/clock.cpp b/libc/src/time/linux/clock.cpp
index fc48e2792747d..2c1eee8e5d60a 100644
--- a/libc/src/time/linux/clock.cpp
+++ b/libc/src/time/linux/clock.cpp
@@ -10,7 +10,7 @@
 #include "hdr/time_macros.h"
 #include "src/__support/CPP/limits.h"
 #include "src/__support/common.h"
-#include "src/__support/time/clock_gettime.h"
+#include "src/__support/time/linux/clock_gettime.h"
 #include "src/__support/time/units.h"
 #include "src/errno/libc_errno.h"
 

diff  --git a/libc/src/time/linux/clock_gettime.cpp b/libc/src/time/linux/clock_gettime.cpp
index 920363e85e06c..d7b8cfd245bc4 100644
--- a/libc/src/time/linux/clock_gettime.cpp
+++ b/libc/src/time/linux/clock_gettime.cpp
@@ -8,7 +8,7 @@
 
 #include "src/time/clock_gettime.h"
 #include "src/__support/common.h"
-#include "src/__support/time/clock_gettime.h"
+#include "src/__support/time/linux/clock_gettime.h"
 #include "src/errno/libc_errno.h"
 
 namespace LIBC_NAMESPACE {

diff  --git a/libc/src/time/linux/gettimeofday.cpp b/libc/src/time/linux/gettimeofday.cpp
index c7bcd45e01fa9..f868f5ff4d4b3 100644
--- a/libc/src/time/linux/gettimeofday.cpp
+++ b/libc/src/time/linux/gettimeofday.cpp
@@ -10,7 +10,7 @@
 #include "hdr/time_macros.h"
 #include "hdr/types/suseconds_t.h"
 #include "src/__support/common.h"
-#include "src/__support/time/clock_gettime.h"
+#include "src/__support/time/linux/clock_gettime.h"
 #include "src/__support/time/units.h"
 #include "src/errno/libc_errno.h"
 

diff  --git a/libc/src/time/linux/time.cpp b/libc/src/time/linux/time.cpp
index 93d5d73627642..32f531efb6d15 100644
--- a/libc/src/time/linux/time.cpp
+++ b/libc/src/time/linux/time.cpp
@@ -8,7 +8,7 @@
 
 #include "hdr/time_macros.h"
 #include "src/__support/common.h"
-#include "src/__support/time/clock_gettime.h"
+#include "src/__support/time/linux/clock_gettime.h"
 #include "src/errno/libc_errno.h"
 #include "src/time/time_func.h"
 


        


More information about the llvm-branch-commits mailing list