[PATCH] D107699: [mlir] Avoid including <alloca.h> on FreeBSD and NetBSD
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 7 13:00:17 PDT 2021
dim created this revision.
dim added reviewers: aartbik, akuegel, emaste, herhut, nikic.
Herald added subscribers: wrengr, Chia-hungDuan, dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, krytarowski.
dim requested review of this revision.
Herald added subscribers: stephenneuendorffer, nicolasvasilache.
Herald added a project: MLIR.
Instead, include `<cstdlib>` which is the canonical header containing
the declaration of `alloca()`.
Repository:
rG LLVM Github Monorepo
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.364978.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210807/895f9ff1/attachment.bin>
More information about the llvm-commits
mailing list