MetadataLoader: Make sure every member of MetadataLoader are initialized (NFC)

llvm-svn: 290407
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index 695b2b0..1cfa1a8 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -97,10 +97,18 @@
 static int64_t unrotateSign(uint64_t U) { return U & 1 ? ~(U >> 1) : U >> 1; }
 
 class BitcodeReaderMetadataList {
-  unsigned NumFwdRefs;
-  bool AnyFwdRefs;
-  unsigned MinFwdRef;
-  unsigned MaxFwdRef;
+  /// Keep track of the current number of ForwardReference in the list.
+  unsigned NumFwdRefs = 0;
+  /// Maintain the range [min-max] that needs to be inspected to resolve cycles.
+  /// This is the range of Metadata that have involved forward reference during
+  /// loading and that needs to be inspected to resolve cycles. It is purely an
+  /// optimization to avoid spending time resolving cycles outside of this
+  /// range, i.e. where there hasn't been any forward reference.
+  unsigned MinFwdRef = 0;
+  unsigned MaxFwdRef = 0;
+  /// Set to true if there was any FwdRef encountered. This is used to track if
+  /// we need to resolve cycles after loading metadatas.
+  bool AnyFwdRefs = false;
 
   /// Array of metadata references.
   ///
@@ -119,8 +127,7 @@
   LLVMContext &Context;
 
 public:
-  BitcodeReaderMetadataList(LLVMContext &C)
-      : NumFwdRefs(0), AnyFwdRefs(false), Context(C) {}
+  BitcodeReaderMetadataList(LLVMContext &C) : Context(C) {}
 
   // vector compatibility methods
   unsigned size() const { return MetadataPtrs.size(); }