aboutsummaryrefslogtreecommitdiff
path: root/src/backend/jit/llvm/llvmjit_inline.cpp
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2019-07-29 10:12:37 +1200
committerThomas Munro <tmunro@postgresql.org>2019-07-29 10:24:38 +1200
commit0ef70bbaddb6b725c1d0d72bcf607ef9fdba0c1c (patch)
treee6efdf4eabc408840a6cdbfcebf6dd0683453a2a /src/backend/jit/llvm/llvmjit_inline.cpp
parent0e8f927fa6bb428975645337d19ab33b348cef86 (diff)
downloadpostgresql-0ef70bbaddb6b725c1d0d72bcf607ef9fdba0c1c.tar.gz
postgresql-0ef70bbaddb6b725c1d0d72bcf607ef9fdba0c1c.zip
Avoid macro clash with LLVM 9.
Early previews of LLVM 9 reveal that our Min() macro causes compiler errors in LLVM headers reached by the #include directives in llvmjit_inline.cpp. Let's just undefine it. Per buildfarm animal seawasp. Back-patch to 11. Reviewed-by: Fabien Coelho, Tom Lane Discussion: https://postgr.es/m/20190606173216.GA6306%40alvherre.pgsql
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_inline.cpp')
-rw-r--r--src/backend/jit/llvm/llvmjit_inline.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/jit/llvm/llvmjit_inline.cpp b/src/backend/jit/llvm/llvmjit_inline.cpp
index ece898e6579..731030ba660 100644
--- a/src/backend/jit/llvm/llvmjit_inline.cpp
+++ b/src/backend/jit/llvm/llvmjit_inline.cpp
@@ -42,6 +42,9 @@ extern "C"
#include <llvm-c/Core.h>
#include <llvm-c/BitReader.h>
+/* Avoid macro clash with LLVM's C++ headers */
+#undef Min
+
#include <llvm/ADT/SetVector.h>
#include <llvm/ADT/StringSet.h>
#include <llvm/ADT/StringMap.h>