[libcxx-commits] [PATCH] D154490: [libunwind] Add missing alloca.h include

Steven van der Schoot via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 5 03:32:56 PDT 2023


StevenvdSchoot created this revision.
StevenvdSchoot added a reviewer: libunwind.
Herald added a project: All.
StevenvdSchoot requested review of this revision.
Herald added projects: LLVM, libunwind.
Herald added subscribers: libcxx-commits, llvm-commits.
Herald added 1 blocking reviewer(s): libunwind.

Most C standard library implementations will include alloca.h in
stdlib.h, but this is not garenteed. Newlib, for example, will not include
alloca.h in stdlib.h when the translation unit that includes stdlib.h is
comipled with pedantic/without gnu extentions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154490

Files:
  libunwind/src/config.h


Index: libunwind/src/config.h
===================================================================
--- libunwind/src/config.h
+++ libunwind/src/config.h
@@ -125,6 +125,7 @@
 #if defined(_LIBUNWIND_REMEMBER_STACK_ALLOC) || defined(__APPLE__) ||          \
     defined(__linux__) || defined(__ANDROID__) || defined(__MINGW32__) ||      \
     defined(_LIBUNWIND_IS_BAREMETAL)
+#include <alloca.h>
 #define _LIBUNWIND_REMEMBER_ALLOC(_size) alloca(_size)
 #define _LIBUNWIND_REMEMBER_FREE(_ptr)                                         \
   do {                                                                         \


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154490.537287.patch
Type: text/x-patch
Size: 615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230705/9e401608/attachment.bin>


More information about the libcxx-commits mailing list