Merge pull request #8386 from stenzek/gcc-array-workaround

FixedSizeQueue: Work around GCC generating large amounts of debug info
This commit is contained in:
Connor McLaughlin 2019-10-09 15:42:53 +10:00 committed by GitHub
commit 6e613f4f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -21,7 +21,13 @@ public:
void clear()
{
if constexpr (!std::is_trivial_v<T>)
storage = {};
{
// The clear of non-trivial objects previously used "storage = {}". However, this causes GCC
// to take a very long time to compile the file/function, as well as generating huge amounts
// of debug information (~2GB object file, ~600MB of debug info).
while (count > 0)
pop();
}
head = 0;
tail = 0;