[compiler-rt] r333678 - Fix GCC 4.8.5 build by avoiding braced default member initializer
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu May 31 11:26:36 PDT 2018
Author: rnk
Date: Thu May 31 11:26:36 2018
New Revision: 333678
URL: http://llvm.org/viewvc/llvm-project?rev=333678&view=rev
Log:
Fix GCC 4.8.5 build by avoiding braced default member initializer
Use internal_memset instead. Should revive all Linux Chromium ToT bots.
Modified:
compiler-rt/trunk/lib/xray/xray_allocator.h
Modified: compiler-rt/trunk/lib/xray/xray_allocator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_allocator.h?rev=333678&r1=333677&r2=333678&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_allocator.h (original)
+++ compiler-rt/trunk/lib/xray/xray_allocator.h Thu May 31 11:26:36 2018
@@ -71,8 +71,15 @@ private:
static constexpr auto BlockPtrCount =
(kCacheLineSize / sizeof(Block *)) - 1;
+ BlockLink() {
+ // Zero out Blocks.
+ // FIXME: Use a braced member initializer when we drop support for GCC
+ // 4.8.
+ internal_memset(Blocks, 0, sizeof(Blocks));
+ }
+
// FIXME: Align this to cache-line address boundaries?
- Block Blocks[BlockPtrCount]{};
+ Block Blocks[BlockPtrCount];
BlockLink *Prev = nullptr;
};
More information about the llvm-commits
mailing list