aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2025-01-16 22:47:22 +0200
committerGitHub <noreply@github.com>2025-01-16 22:47:22 +0200
commit94609aee73d7123bc9afe002a4987d06eba9f452 (patch)
treee527c532773bdcf9d7a7c6801e0267d5730caf25 /lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
parent99a562b3cb17e89273ba0fe77129f2fb17a19381 (diff)
downloadllvm-94609aee73d7123bc9afe002a4987d06eba9f452.zip
llvm-94609aee73d7123bc9afe002a4987d06eba9f452.tar.gz
llvm-94609aee73d7123bc9afe002a4987d06eba9f452.tar.bz2
[Support] Remove an unnecessary include (#123182)
In 1e53f9523d3d5fcb2993b4b6540f1ed8d743380b, the FileSystem.h header was changed to always include <sys/stat.h>, while it previously only was included if HAVE_SYS_STAT_H was defined. HAVE_SYS_STAT_H was defined in llvm/Config/config.h, while FileSystem.h only included llvm/Config/llvm-config.h. Thus, <sys/stat.h> was only being included in some but not all cases. The change to always include <sys/stat.h> broke compiling LLDB for MinGW targets, because the MinGW <sys/stat.h> header adds an "#define fstat _fstat64" define, which breaks LLDBs use of a struct with a member named "fstat". Remove the include of <sys/stat.h> in FileSystem.h, as it seems to not be necessary in practice, fixing compilation of LLDB for MinGW targets. Change one instance of defined(_MSC_VER) into defined(_WIN32) in ErrorHandling.cpp to get <io.h> included; this source file did include config.h before transitively including FileSystem.h. The include of <sys/stat.h> in FileSystem.h would bring in <io.h> (needed for ::write()), explaining why this ifdef didn't need to cover MinGW before.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h')
0 files changed, 0 insertions, 0 deletions