As part of developing http://reviews.llvm.org/D8876 (adding dynamic stack alignment support
for AArch64), I needed a run-time test to check the basic correctness of frame lowering.
There didn't seem to be a test already that aims to check basic correct generation of
frame setup/prologue code & accesses to objects on the stack.
The added test in this patch uses a template function, so that depending on the
template parameters, the different areas on the stack (arguments, locals, VLAs, alignment
spacing, spill slots, ...) are either present or not present. By instantiating this function
for all combination of its template parameters, the basic correct setup of the frame for
all combinations of frame areas being present or not, is being tested.
I'm afraid the test case needs some C++11 features - so this is the first test added to
the test suite that relies on C++11. I've created a separate sub-directory for tests needing
C++11 features, so hopefully it'll be possible for people to still use the test-suite with
compilers not supporting C++11, if that would be needed.
I think it would be useful to add this to the test-suite, so buildbots running LNT will
detect correctness regressions in frame layout code quickly.
Is adding a test case like this OK? Any review comments on the code?