[llvm-commits] PATCH: Fix 2004-08-12-InlinerAndAllocas.c for NetBSD

Krister Walfridsson krister.walfridsson at gmail.com
Fri Jul 30 10:32:46 PDT 2010


NetBSD does not have alloca.h, so it need to be handled in the same way as
FreeBSD/OpenBSD.

    /Krister
-------------- next part --------------
Index: SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c
===================================================================
--- SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c	(revision 109871)
+++ SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c	(working copy)
@@ -1,7 +1,7 @@
 // A compiler cannot inline Callee into main unless it is prepared to reclaim
 // the stack memory allocated in it.
 
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 #include <stdlib.h>
 #else
 #include <alloca.h>


More information about the llvm-commits mailing list