<div dir="ltr">Hello,<div><br></div><div>One of the biggest issue with the current MinGW build was that lldb-types included <Windows.h>.</div><div><br></div><div>It leads to slower compile time, but more importantly, due to its monolithic architecture, it was pulling lot of unwanted #defines. This results in various clash (requiring #undef). As an example, this recently resulted in many enum/#define conflicts with llvm's COFF.h.</div>

<div><br></div><div>On top of that, it was also polluding user code including LLDB since it would in turn include Windows.h, pulling all those unwanted #define, and removing control over how the user might want to include <windows.h> himself (it's controllable through various "pre #define").</div>

<div><br></div><div>As a result, I tried to remove <windows.h> from lldb-types.h.</div><div>This led to various small refactoring (usually moving things from .h to .cpp, esp. for sockaddr, TimeValue, using LLVM atomic, etc...).</div>

<div>Also SocketAddress is considered internal only (included only in .cpp, not .h) because it requires system defines (only .h file requiring windows.h).</div><div>I had to get rid of timeval from headers (which is unfortunately defined by winsock2.h in Windows).</div>

<div><br></div><div>Note that I added two new functions and a constructor in TimeValue: seconds() and nanoseconds(). It doesn't match casing of existing lldb class but I tried to use LLVM's TimeValue function name so that a later transition to LLVM one will be more easy.</div>

<div><br></div><div>Patch might need some tuning, but it should give you a good idea of what I want to achieve.<br></div><div><div>Let me know what you think about it.</div></div><div><br></div><div>Virgile<br></div></div>