Skip to content

Commit 5a0e0b6

Browse files
Revert "[libc][NFC] adjust time related implementations" (#91657)
Reverts #91485. It breaks GPU and fuchisa.
1 parent ca39175 commit 5a0e0b6

24 files changed

+71
-335
lines changed

libc/hdr/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,4 @@ add_proxy_header_library(
6868
libc.include.llvm-libc-macros.sys_epoll_macros
6969
)
7070

71-
add_proxy_header_library(
72-
time_macros
73-
HDRS
74-
time_macros.h
75-
FULL_BUILD_DEPENDS
76-
libc.include.time
77-
libc.include.llvm-libc-macros.time_macros
78-
)
79-
8071
add_subdirectory(types)

libc/hdr/time_macros.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

libc/hdr/types/CMakeLists.txt

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -63,48 +63,3 @@ add_proxy_header_library(
6363
libc.include.llvm-libc-types.fexcept_t
6464
libc.include.fenv
6565
)
66-
67-
add_proxy_header_library(
68-
time_t
69-
HDRS
70-
time_t.h
71-
FULL_BUILD_DEPENDS
72-
libc.include.llvm-libc-types.time_t
73-
libc.include.time
74-
)
75-
76-
add_proxy_header_library(
77-
clockid_t
78-
HDRS
79-
clockid_t.h
80-
FULL_BUILD_DEPENDS
81-
libc.include.llvm-libc-types.clockid_t
82-
libc.include.sys_types
83-
)
84-
85-
add_proxy_header_library(
86-
clock_t
87-
HDRS
88-
clock_t.h
89-
FULL_BUILD_DEPENDS
90-
libc.include.llvm-libc-types.clock_t
91-
libc.include.time
92-
)
93-
94-
add_proxy_header_library(
95-
suseconds_t
96-
HDRS
97-
suseconds_t.h
98-
FULL_BUILD_DEPENDS
99-
libc.include.llvm-libc-types.suseconds_t
100-
libc.include.sys_time
101-
)
102-
103-
add_proxy_header_library(
104-
struct_timeval
105-
HDRS
106-
struct_timeval.h
107-
FULL_BUILD_DEPENDS
108-
libc.include.llvm-libc-types.struct_timeval
109-
libc.include.sys_time
110-
)

libc/hdr/types/clock_t.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

libc/hdr/types/clockid_t.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

libc/hdr/types/struct_timeval.h

Lines changed: 0 additions & 21 deletions
This file was deleted.

libc/hdr/types/suseconds_t.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

libc/hdr/types/time_t.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

libc/src/__support/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,5 +281,3 @@ add_subdirectory(File)
281281
add_subdirectory(HashTable)
282282

283283
add_subdirectory(fixed_point)
284-
285-
add_subdirectory(time)

libc/src/__support/time/CMakeLists.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.

libc/src/__support/time/clock_gettime.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

libc/src/__support/time/linux/CMakeLists.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.

libc/src/__support/time/units.h

Lines changed: 0 additions & 38 deletions
This file was deleted.

libc/src/time/clock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_TIME_CLOCK_H
1010
#define LLVM_LIBC_SRC_TIME_CLOCK_H
1111

12-
#include "hdr/types/clock_t.h"
12+
#include <time.h>
1313

1414
namespace LIBC_NAMESPACE {
1515

libc/src/time/clock_gettime.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
#ifndef LLVM_LIBC_SRC_TIME_CLOCK_GETTIME_H
1010
#define LLVM_LIBC_SRC_TIME_CLOCK_GETTIME_H
1111

12-
#include "hdr/types/clockid_t.h"
13-
#include "hdr/types/struct_timespec.h"
12+
#include <time.h>
1413

1514
namespace LIBC_NAMESPACE {
1615

17-
int clock_gettime(clockid_t clockid, timespec *tp);
16+
int clock_gettime(clockid_t clockid, struct timespec *tp);
1817

1918
} // namespace LIBC_NAMESPACE
2019

libc/src/time/gettimeofday.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLVM_LIBC_SRC_TIME_GETTIMEOFDAY_H
1010
#define LLVM_LIBC_SRC_TIME_GETTIMEOFDAY_H
1111

12-
#include "hdr/types/struct_timeval.h"
12+
#include <time.h>
1313

1414
namespace LIBC_NAMESPACE {
1515

0 commit comments

Comments
 (0)