Skip to content

Commit 2e6402c

Browse files
committed
[NFC] Add explicit initializer to PGOCtxProfReader's RootEntryCount
I found that on Clang versions before 11 we suppress the defaulted constructor because RootEntryCount would not be initialized. This patch adds an explicit initializer which should suppress this error.
1 parent 4ce1d1f commit 2e6402c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ProfileData/PGOCtxProfReader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class PGOCtxProfContext final : public internal::IndexNode {
9292

9393
GlobalValue::GUID GUID = 0;
9494
SmallVector<uint64_t, 16> Counters;
95-
const std::optional<uint64_t> RootEntryCount;
95+
const std::optional<uint64_t> RootEntryCount{};
9696
CallsiteMapTy Callsites;
9797

9898
PGOCtxProfContext(GlobalValue::GUID G, SmallVectorImpl<uint64_t> &&Counters,

0 commit comments

Comments
 (0)