Add a definition of alloca

Benchmarks not including headers files fail as we only provided a definition of
__builtin_alloca, which alloca expands to in standard libary headers, but none
for alloca directly.
This commit is contained in:
Michael Tautschnig 2018-11-19 18:41:02 +00:00 committed by Daniel Kroening
parent 1a970e3e91
commit 3a577d784c
1 changed files with 12 additions and 0 deletions

View File

@ -147,6 +147,18 @@ inline void *__builtin_alloca(__CPROVER_size_t alloca_size)
return res;
}
/* FUNCTION: alloca */
#undef alloca
void *__builtin_alloca(__CPROVER_size_t alloca_size);
inline void *alloca(__CPROVER_size_t alloca_size)
{
__CPROVER_HIDE:;
return __builtin_alloca(alloca_size);
}
/* FUNCTION: free */
#undef free