Skip to content

Commit c980cc0

Browse files
author
Job Henandez Lara
authored
[libc] Remove _Exit proxy func header and use LIBC_NAMESPACE::_Exit in tests (#114904)
This improves/fixes this pr #114718. In this PR we removed the _Exit proxy func because it was not needed. Instead we used `LIBC_NAMESPACE::_Exit`
1 parent 9501af5 commit c980cc0

File tree

5 files changed

+3
-38
lines changed

5 files changed

+3
-38
lines changed

libc/hdr/func/CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,3 @@ add_proxy_header_library(
4040
FULL_BUILD_DEPENDS
4141
libc.include.stdlib
4242
)
43-
44-
add_proxy_header_library(
45-
_Exit
46-
HDRS
47-
_Exit.h
48-
DEPENDS
49-
libc.hdr.stdlib_overlay
50-
FULL_BUILD_DEPENDS
51-
libc.include.stdlib
52-
)

libc/hdr/func/_Exit.h

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

libc/test/src/stdlib/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ if(LLVM_LIBC_FULL_BUILD)
382382
SRCS
383383
atexit_test.cpp
384384
DEPENDS
385-
libc.hdr.func._Exit
386385
libc.src.stdlib._Exit
387386
libc.src.stdlib.exit
388387
libc.src.stdlib.atexit
@@ -398,7 +397,7 @@ if(LLVM_LIBC_FULL_BUILD)
398397
SRCS
399398
at_quick_exit_test.cpp
400399
DEPENDS
401-
libc.hdr.func._Exit
400+
libc.src.stdlib._Exit
402401
libc.src.stdlib.quick_exit
403402
libc.src.stdlib.at_quick_exit
404403
libc.src.__support.CPP.array

libc/test/src/stdlib/at_quick_exit_test.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "hdr/func/_Exit.h"
109
#include "src/__support/CPP/array.h"
1110
#include "src/__support/CPP/utility.h"
1211
#include "src/stdlib/at_quick_exit.h"
@@ -34,7 +33,7 @@ TEST(LlvmLibcAtQuickExit, Basic) {
3433

3534
TEST(LlvmLibcAtQuickExit, AtQuickExitCallsSysExit) {
3635
auto test = [] {
37-
LIBC_NAMESPACE::at_quick_exit(+[] { _Exit(1); });
36+
LIBC_NAMESPACE::at_quick_exit(+[] { LIBC_NAMESPACE::_Exit(1); });
3837
LIBC_NAMESPACE::quick_exit(0);
3938
};
4039
EXPECT_EXITS(test, 1);

libc/test/src/stdlib/atexit_test.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "hdr/func/_Exit.h"
109
#include "src/__support/CPP/array.h"
1110
#include "src/__support/CPP/utility.h"
1211
#include "src/stdlib/atexit.h"
@@ -34,7 +33,7 @@ TEST(LlvmLibcAtExit, Basic) {
3433

3534
TEST(LlvmLibcAtExit, AtExitCallsSysExit) {
3635
auto test = [] {
37-
LIBC_NAMESPACE::atexit(+[] { _Exit(1); });
36+
LIBC_NAMESPACE::atexit(+[] { LIBC_NAMESPACE::_Exit(1); });
3837
LIBC_NAMESPACE::exit(0);
3938
};
4039
EXPECT_EXITS(test, 1);

0 commit comments

Comments
 (0)