[PATCH] D149635: [libunwind] Use __builtin_alloca to avoid missing include

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 10:59:32 PDT 2023


ldionne added inline comments.


================
Comment at: libunwind/src/config.h:129
     defined(__linux__) || defined(__ANDROID__) || defined(__MINGW32__) ||      \
     defined(_LIBUNWIND_IS_BAREMETAL)
+#define _LIBUNWIND_REMEMBER_ALLOC(_size) __builtin_alloca(_size)
----------------
danielkiss wrote:
> maybe we could add an extra guard just to be sure 
Honestly, I'd rather see it fail explicitly in that case than silently fall back to using `malloc`. If someone uses a compiler we don't support here, the correct path IMO would be for it to fail fast and loud (at compile-time).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149635



More information about the llvm-commits mailing list