Skip to content

Commit bf33835

Browse files
committed
[lldb] Get rid of HAVE_SYS_TYPES_H
LLVM includes this header unconditionally on all platforms (including Windows), so this define should no longer be necessary. No behavior change. Differential Revision: https://reviews.llvm.org/D107338
1 parent 4367cba commit bf33835

File tree

8 files changed

+2
-28
lines changed

8 files changed

+2
-28
lines changed

lldb/cmake/modules/LLDBGenerateConfig.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ set(CMAKE_REQUIRED_DEFINITIONS)
1212
check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
1313

1414
check_include_file(termios.h HAVE_TERMIOS_H)
15-
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
1615
check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
1716

1817
check_cxx_symbol_exists(process_vm_readv "sys/uio.h" HAVE_PROCESS_VM_READV)

lldb/include/lldb/Host/Config.h.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313

1414
#cmakedefine01 LLDB_HAVE_EL_RFUNC_T
1515

16-
17-
#cmakedefine01 HAVE_SYS_TYPES_H
18-
1916
#cmakedefine01 HAVE_SYS_EVENT_H
2017

2118
#cmakedefine01 HAVE_PPOLL

lldb/include/lldb/Host/windows/PosixApi.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,12 @@
5656
#define S_IRWXO 0
5757
#endif
5858

59-
#if HAVE_SYS_TYPES_H
6059
// pyconfig.h typedefs this. We require python headers to be included before
6160
// any LLDB headers, but there's no way to prevent python's pid_t definition
6261
// from leaking, so this is the best option.
6362
#ifndef NO_PID_T
6463
#include <sys/types.h>
6564
#endif
66-
#endif // HAVE_SYS_TYPES_H
6765

6866
#ifdef _MSC_VER
6967

lldb/source/Expression/UserExpression.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "lldb/Host/Config.h"
10-
119
#include <cstdio>
12-
#if HAVE_SYS_TYPES_H
1310
#include <sys/types.h>
14-
#endif
1511

1612
#include <cstdlib>
1713
#include <map>

lldb/source/Expression/UtilityFunction.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "lldb/Host/Config.h"
10-
119
#include <cstdio>
12-
#if HAVE_SYS_TYPES_H
1310
#include <sys/types.h>
14-
#endif
15-
1611

1712
#include "lldb/Core/Module.h"
1813
#include "lldb/Core/StreamFile.h"

lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "lldb/Host/Config.h"
10-
119
#include <cstdio>
12-
#if HAVE_SYS_TYPES_H
1310
#include <sys/types.h>
14-
#endif
1511

1612
#include <cstdlib>
1713
#include <map>

lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "lldb/Host/Config.h"
10-
119
#include "ClangUtilityFunction.h"
1210
#include "ClangExpressionDeclMap.h"
1311
#include "ClangExpressionParser.h"
1412
#include "ClangExpressionSourceCode.h"
1513
#include "ClangPersistentVariables.h"
1614

1715
#include <cstdio>
18-
#if HAVE_SYS_TYPES_H
1916
#include <sys/types.h>
20-
#endif
2117

2218

2319
#include "lldb/Core/Module.h"

lldb/tools/driver/Platform.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,16 @@
99
#ifndef LLDB_TOOLS_DRIVER_PLATFORM_H
1010
#define LLDB_TOOLS_DRIVER_PLATFORM_H
1111

12-
#include "lldb/Host/Config.h"
13-
1412
#if defined(_WIN32)
1513

1614
#include <io.h>
1715
#if defined(_MSC_VER)
1816
#include <csignal>
1917
#endif
20-
#if HAVE_SYS_TYPES_H
21-
#include <sys/types.h>
22-
#endif
18+
2319
#include "lldb/Host/windows/windows.h"
2420
#include <cinttypes>
21+
#include <sys/types.h>
2522

2623
struct winsize {
2724
long ws_col;

0 commit comments

Comments
 (0)