summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2019-10-06 16:23:45 +1000
committerStenzek <stenzek@gmail.com>2019-10-06 16:23:45 +1000
commit4fd262d0b844c82f5a797f2bcfcd573a09b6f16c (patch)
treecb137c5c446c1cef74dc48a46756e8381074654b /Source
parent3c6c94a04a61a97990dd459138912f75c9f0eb1a (diff)
FixedSizeQueue: Work around GCC generating large amounts of debug info
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Common/FixedSizeQueue.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/Common/FixedSizeQueue.h b/Source/Core/Common/FixedSizeQueue.h
index 149ee9846b..889cbe2ee7 100644
--- a/Source/Core/Common/FixedSizeQueue.h
+++ b/Source/Core/Common/FixedSizeQueue.h
@@ -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;