[libunwind] 3f6818b - [libunwind] Use __builtin_alloca to avoid missing include

Louis Dionne via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 11:00:11 PDT 2023


Author: Reagan Bohan
Date: 2023-09-12T14:00:03-04:00
New Revision: 3f6818bf444f902a64a7604e67b92cf8c98b3f56

URL: https://github.com/llvm/llvm-project/commit/3f6818bf444f902a64a7604e67b92cf8c98b3f56
DIFF: https://github.com/llvm/llvm-project/commit/3f6818bf444f902a64a7604e67b92cf8c98b3f56.diff

LOG: [libunwind] Use __builtin_alloca to avoid missing include

Differential Revision: https://reviews.llvm.org/D149635

Added: 
    

Modified: 
    libunwind/src/config.h

Removed: 
    


################################################################################
diff  --git a/libunwind/src/config.h b/libunwind/src/config.h
index 35262e5ce26b86a..a20bf43272cde33 100644
--- a/libunwind/src/config.h
+++ b/libunwind/src/config.h
@@ -127,7 +127,7 @@
 #if defined(_LIBUNWIND_REMEMBER_STACK_ALLOC) || defined(__APPLE__) ||          \
     defined(__linux__) || defined(__ANDROID__) || defined(__MINGW32__) ||      \
     defined(_LIBUNWIND_IS_BAREMETAL)
-#define _LIBUNWIND_REMEMBER_ALLOC(_size) alloca(_size)
+#define _LIBUNWIND_REMEMBER_ALLOC(_size) __builtin_alloca(_size)
 #define _LIBUNWIND_REMEMBER_FREE(_ptr)                                         \
   do {                                                                         \
   } while (0)


        


More information about the cfe-commits mailing list