Skip to content

Commit

Permalink
Revert "[libc][NFC] adjust time related implementations" (#91657)
Browse files Browse the repository at this point in the history
Reverts #91485. It breaks GPU and fuchisa.
  • Loading branch information
SchrodingerZhu committed May 9, 2024
1 parent ca39175 commit 5a0e0b6
Show file tree
Hide file tree
Showing 24 changed files with 71 additions and 335 deletions.
9 changes: 0 additions & 9 deletions libc/hdr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,4 @@ add_proxy_header_library(
libc.include.llvm-libc-macros.sys_epoll_macros
)

add_proxy_header_library(
time_macros
HDRS
time_macros.h
FULL_BUILD_DEPENDS
libc.include.time
libc.include.llvm-libc-macros.time_macros
)

add_subdirectory(types)
22 changes: 0 additions & 22 deletions libc/hdr/time_macros.h

This file was deleted.

45 changes: 0 additions & 45 deletions libc/hdr/types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,48 +63,3 @@ add_proxy_header_library(
libc.include.llvm-libc-types.fexcept_t
libc.include.fenv
)

add_proxy_header_library(
time_t
HDRS
time_t.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.time_t
libc.include.time
)

add_proxy_header_library(
clockid_t
HDRS
clockid_t.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.clockid_t
libc.include.sys_types
)

add_proxy_header_library(
clock_t
HDRS
clock_t.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.clock_t
libc.include.time
)

add_proxy_header_library(
suseconds_t
HDRS
suseconds_t.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.suseconds_t
libc.include.sys_time
)

add_proxy_header_library(
struct_timeval
HDRS
struct_timeval.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.struct_timeval
libc.include.sys_time
)
22 changes: 0 additions & 22 deletions libc/hdr/types/clock_t.h

This file was deleted.

22 changes: 0 additions & 22 deletions libc/hdr/types/clockid_t.h

This file was deleted.

21 changes: 0 additions & 21 deletions libc/hdr/types/struct_timeval.h

This file was deleted.

22 changes: 0 additions & 22 deletions libc/hdr/types/suseconds_t.h

This file was deleted.

22 changes: 0 additions & 22 deletions libc/hdr/types/time_t.h

This file was deleted.

2 changes: 0 additions & 2 deletions libc/src/__support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,5 +281,3 @@ add_subdirectory(File)
add_subdirectory(HashTable)

add_subdirectory(fixed_point)

add_subdirectory(time)
19 changes: 0 additions & 19 deletions libc/src/__support/time/CMakeLists.txt

This file was deleted.

23 changes: 0 additions & 23 deletions libc/src/__support/time/clock_gettime.h

This file was deleted.

14 changes: 0 additions & 14 deletions libc/src/__support/time/linux/CMakeLists.txt

This file was deleted.

38 changes: 0 additions & 38 deletions libc/src/__support/time/units.h

This file was deleted.

2 changes: 1 addition & 1 deletion libc/src/time/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_TIME_CLOCK_H
#define LLVM_LIBC_SRC_TIME_CLOCK_H

#include "hdr/types/clock_t.h"
#include <time.h>

namespace LIBC_NAMESPACE {

Expand Down
5 changes: 2 additions & 3 deletions libc/src/time/clock_gettime.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
#ifndef LLVM_LIBC_SRC_TIME_CLOCK_GETTIME_H
#define LLVM_LIBC_SRC_TIME_CLOCK_GETTIME_H

#include "hdr/types/clockid_t.h"
#include "hdr/types/struct_timespec.h"
#include <time.h>

namespace LIBC_NAMESPACE {

int clock_gettime(clockid_t clockid, timespec *tp);
int clock_gettime(clockid_t clockid, struct timespec *tp);

} // namespace LIBC_NAMESPACE

Expand Down
2 changes: 1 addition & 1 deletion libc/src/time/gettimeofday.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_TIME_GETTIMEOFDAY_H
#define LLVM_LIBC_SRC_TIME_GETTIMEOFDAY_H

#include "hdr/types/struct_timeval.h"
#include <time.h>

namespace LIBC_NAMESPACE {

Expand Down
Loading

0 comments on commit 5a0e0b6

Please sign in to comment.