[PATCH] D107699: [mlir] Avoid including <alloca.h> on FreeBSD and NetBSD

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 8 04:33:56 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGab4b4684a26c: [mlir] Avoid including <alloca.h> on FreeBSD and NetBSD (authored by dim).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107699/new/

https://reviews.llvm.org/D107699

Files:
  mlir/lib/ExecutionEngine/CRunnerUtils.cpp


Index: mlir/lib/ExecutionEngine/CRunnerUtils.cpp
===================================================================
--- mlir/lib/ExecutionEngine/CRunnerUtils.cpp
+++ mlir/lib/ExecutionEngine/CRunnerUtils.cpp
@@ -15,7 +15,11 @@
 #include "mlir/ExecutionEngine/CRunnerUtils.h"
 
 #ifndef _WIN32
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+#include <cstdlib>
+#else
 #include <alloca.h>
+#endif
 #include <sys/time.h>
 #else
 #include "malloc.h"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107699.365013.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210808/66a291df/attachment.bin>


More information about the llvm-commits mailing list