From c5f103663bbee226d20bf6405457a62e7ec41611 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sun, 18 Oct 2026 08:41:32 +0000 Subject: fix(driver): include LLVM COFF helpers before Windows macros Parse MinGWCOFF.h before windows.h so IMAGE_* macros do not replace LLVM COFF enum declarations or their uses in the normalization helper. Co-Authored-By: Claude Opus 5.5 --- tools/driver/EmbeddedRunner.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/driver/EmbeddedRunner.cc b/tools/driver/EmbeddedRunner.cc index 8950251..7bfbcf0 100644 --- a/tools/driver/EmbeddedRunner.cc +++ b/tools/driver/EmbeddedRunner.cc @@ -20,7 +20,6 @@ #ifndef NOMINMAX #define NOMINMAX #endif -#include #include #include "llvm/ExecutionEngine/JITLink/JITLink.h" #include "llvm/ExecutionEngine/JITLink/x86_64.h" @@ -28,6 +27,9 @@ #include "llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h" #include "llvm/Support/Endian.h" #include "MinGWCOFF.h" +// Windows IMAGE_* macros conflict with LLVM COFF enums and inline helpers. +// Parse all LLVM COFF declarations and helpers before introducing those macros. +#include #endif namespace { -- cgit v1.3.1-4-g156e