diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h b/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h index 3b6d1b0b1a7099..01916bd18fb868 100644 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h +++ b/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h @@ -111,7 +111,8 @@ class MemberPointerInfo { } TypeIndex ContainingType; - PointerToMemberRepresentation Representation; + PointerToMemberRepresentation Representation = + PointerToMemberRepresentation::Unknown; }; class TypeRecord { @@ -160,8 +161,8 @@ class ProcedureRecord : public TypeRecord { 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 @@ class MemberFunctionRecord : public TypeRecord { 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 @@ class LabelRecord : public TypeRecord { LabelRecord(LabelType Mode) : TypeRecord(TypeRecordKind::Label), Mode(Mode) {} - LabelType Mode; + LabelType Mode = LabelType::Near; }; // LF_MFUNC_ID @@ -454,7 +455,7 @@ class TagRecord : public TypeRecord { 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 @@ class TypeServer2Record : public TypeRecord { uint32_t getAge() const { return Age; } StringRef getName() const { return Name; } - GUID Guid; + GUID Guid = {}; uint32_t Age = 0; StringRef Name; };