]> granicus.if.org Git - llvm/commit
[test] Fix TargetParserTest runtime.
authorJordan Rupprecht <rupprecht@google.com>
Wed, 19 Jun 2019 18:03:36 +0000 (18:03 +0000)
committerJordan Rupprecht <rupprecht@google.com>
Wed, 19 Jun 2019 18:03:36 +0000 (18:03 +0000)
commitcc4f8346ba1c0078a57add2a82831326b36b9dea
tree3ec5996d4b20bfb31663124671c3d03b4f0f07a6
parent3bf67713b28e8d86affbc800c370cac205614250
[test] Fix TargetParserTest runtime.

r363780 fixes extreme memory growth by using a new std::vector every loop iteration, but causes runtime to go up (and occasionally timeout in certain situations) because of constructor cost every loop iteration. Fix this by moving the constructor back out, but clearing contents in the loop.

Also apply this to the AArch64 features test case, which seems to use the same pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363851 91177308-0d34-0410-b5e6-96231b3b80d8
unittests/Support/TargetParserTest.cpp