Skip to content

Commit 163871c

Browse files
authored
[Support] Remove workarounds for building with mingw.org toolchains (#145683)
Assume that mingw builds are made with mingw-w64 headers. The old mingw.org distribution isn't even accessible at the moment, and their project hosting site (osdn.net) seems to have been down for a couple of years, and their old project hosting (at sourceforge.net) hasn't been updated since 2018.
1 parent aa24029 commit 163871c

File tree

1 file changed

+0
-64
lines changed

1 file changed

+0
-64
lines changed

llvm/lib/Support/Windows/Signals.inc

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -47,64 +47,6 @@
4747
// back on at the end of the file.
4848
#pragma GCC diagnostic ignored "-Wformat"
4949
#pragma GCC diagnostic ignored "-Wformat-extra-args"
50-
51-
#if !defined(__MINGW64_VERSION_MAJOR)
52-
// MinGW.org does not have updated support for the 64-bit versions of the
53-
// DebugHlp APIs. So we will have to load them manually. The structures and
54-
// method signatures were pulled from DbgHelp.h in the Windows Platform SDK,
55-
// and adjusted for brevity.
56-
typedef struct _IMAGEHLP_LINE64 {
57-
DWORD SizeOfStruct;
58-
PVOID Key;
59-
DWORD LineNumber;
60-
PCHAR FileName;
61-
DWORD64 Address;
62-
} IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
63-
64-
typedef struct _IMAGEHLP_SYMBOL64 {
65-
DWORD SizeOfStruct;
66-
DWORD64 Address;
67-
DWORD Size;
68-
DWORD Flags;
69-
DWORD MaxNameLength;
70-
CHAR Name[1];
71-
} IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64;
72-
73-
typedef struct _tagADDRESS64 {
74-
DWORD64 Offset;
75-
WORD Segment;
76-
ADDRESS_MODE Mode;
77-
} ADDRESS64, *LPADDRESS64;
78-
79-
typedef struct _KDHELP64 {
80-
DWORD64 Thread;
81-
DWORD ThCallbackStack;
82-
DWORD ThCallbackBStore;
83-
DWORD NextCallback;
84-
DWORD FramePointer;
85-
DWORD64 KiCallUserMode;
86-
DWORD64 KeUserCallbackDispatcher;
87-
DWORD64 SystemRangeStart;
88-
DWORD64 KiUserExceptionDispatcher;
89-
DWORD64 StackBase;
90-
DWORD64 StackLimit;
91-
DWORD64 Reserved[5];
92-
} KDHELP64, *PKDHELP64;
93-
94-
typedef struct _tagSTACKFRAME64 {
95-
ADDRESS64 AddrPC;
96-
ADDRESS64 AddrReturn;
97-
ADDRESS64 AddrFrame;
98-
ADDRESS64 AddrStack;
99-
ADDRESS64 AddrBStore;
100-
PVOID FuncTableEntry;
101-
DWORD64 Params[4];
102-
BOOL Far;
103-
BOOL Virtual;
104-
DWORD64 Reserved[3];
105-
KDHELP64 KdHelp;
106-
} STACKFRAME64, *LPSTACKFRAME64;
107-
#endif // !defined(__MINGW64_VERSION_MAJOR)
10850
#endif // __MINGW32__
10951

11052
typedef BOOL(__stdcall *PREAD_PROCESS_MEMORY_ROUTINE64)(
@@ -536,12 +478,6 @@ void sys::PrintStackTraceOnErrorSignal(StringRef Argv0,
536478
}
537479
} // namespace llvm
538480

539-
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
540-
// Provide a prototype for RtlCaptureContext, mingw32 from mingw.org is
541-
// missing it but mingw-w64 has it.
542-
extern "C" VOID WINAPI RtlCaptureContext(PCONTEXT ContextRecord);
543-
#endif
544-
545481
static void LocalPrintStackTrace(raw_ostream &OS, PCONTEXT C) {
546482
STACKFRAME64 StackFrame{};
547483
CONTEXT Context{};

0 commit comments

Comments
 (0)