Hello Thomas,
>> I would just #undef Min for our small number of .cpp files that
>> include LLVM headers. It's not as though you need it in C++, which
>> has std::min() from <algorithm>.
>
> Like so. Fixes the problem for me (llvm-devel-9.0.d20190712).
Hmmm. Not so nice, but if it works, why not, at least the impact is
much smaller than renaming.
Note that the Min macro is used in several pg headers (ginblock.h,
ginxlog.h, hash.h, simplehash.h, spgist_private.h), so you might really
need it depending on what is being done later.
Otherwise, why not simply move llvm C++ includes *before* postgres
includes? They should be fully independent anyway, so the order should
not matter?
--
Fabien.