GCC documents that the alignment parameter is in bits and it must be:
- an integer constant
- a power of two
- a multiple of CHAR_BITS
- below an unspecified limit
This lines up directly with the requirements for LLVM's alloca
instruction, so I went ahead and wired it up. We limit the alignment to
1<<29, which is the maximum alignment supported by LLVM's alloca.
Implements feature request in PR30658
This takes the alignment in bits? That's so ridiculously dumb that I would feel bad about accepting this patch unless it comes with a warning for people writing the obvious-but-wrong __builtin_alloca_with_align(sizeof(T), alignof(T)).