diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h b/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h --- a/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h +++ b/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h @@ -111,7 +111,8 @@ } TypeIndex ContainingType; - PointerToMemberRepresentation Representation; + PointerToMemberRepresentation Representation = + PointerToMemberRepresentation::Unknown; }; class TypeRecord { @@ -160,8 +161,8 @@ TypeIndex getArgumentList() const { return ArgumentList; } TypeIndex ReturnType; - CallingConvention CallConv; - FunctionOptions Options; + CallingConvention CallConv = CallingConvention::NearC; + FunctionOptions Options = FunctionOptions::None; uint16_t ParameterCount = 0; TypeIndex ArgumentList; }; @@ -194,8 +195,8 @@ TypeIndex ReturnType; TypeIndex ClassType; TypeIndex ThisType; - CallingConvention CallConv; - FunctionOptions Options; + CallingConvention CallConv = CallingConvention::NearC; + FunctionOptions Options = FunctionOptions::None; uint16_t ParameterCount = 0; TypeIndex ArgumentList; int32_t ThisPointerAdjustment = 0; @@ -209,7 +210,7 @@ LabelRecord(LabelType Mode) : TypeRecord(TypeRecordKind::Label), Mode(Mode) {} - LabelType Mode; + LabelType Mode = LabelType::Near; }; // LF_MFUNC_ID @@ -454,7 +455,7 @@ StringRef getUniqueName() const { return UniqueName; } uint16_t MemberCount = 0; - ClassOptions Options; + ClassOptions Options = ClassOptions::None; TypeIndex FieldList; StringRef Name; StringRef UniqueName; @@ -585,7 +586,7 @@ uint32_t getAge() const { return Age; } StringRef getName() const { return Name; } - GUID Guid; + GUID Guid = {}; uint32_t Age = 0; StringRef Name; };