[lldb][windows] remove mandatory ordering of the lldb-python.h header (#197298)
`PosixApi.h` typedef'd `pid_t` as `uint32_t`, while Python's
`pyconfig.h` on Windows typedef's it as `int`. C++ forbids redeclaring a
typedef with a different type, so the two headers cannot coexist. The
`NO_PID_T` macro in `lldb-python.h` suppressed LLDB's typedef, but only
if `lldb-python.h` got included before `PosixApi.h`.
`pid_t` on Windows was originally defined in d87fc157d2. At this time,
there was no Python support for LLDB on Windows and `uint32_t` matches
the `DWORD` type used by the Win32 API for process IDs.
This patch matches the Python type in `PosixApi.h`, removing the need
for the include ordering.
This is a follow up to https://github.com/llvm/llvm-project/pull/197048.
This commit is contained in:
1 parent
332fde6053
commit
2384d2872b
17 files changed
+7
-69
No files matched your search
@@ -6,10 +6,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// clang-format off
|
||||
// LLDB Python header must be included first
|
||||
#include "lldb-python.h"
|
||||
//clang-format on
|
||||
|
||||
#include "Interfaces/ScriptInterpreterPythonInterfaces.h"
|
||||
#include "PythonDataObjects.h"
|
||||
|
||||
Reference in new issue
Block a user