Fix non-deterministic iteration order when walking the specializations
of templates by using the newly introduce FoldingSetVector. This
preserves insertion order for all iteration of specializations.

I've also included a somewhat terrifying testcase that rapidly builds up
a large number of functions. This is enough that any system with ASLR
will have non-deterministic debug information generated for the test
case without the fix here as the debug information is generated in part
by walking these specializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156133 91177308-0d34-0410-b5e6-96231b3b80d8
4 files changed