diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-11-07 16:45:36 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-11-07 16:56:17 +0000 |
commit | 0e9b5760f2c6ce6f41600b90b89a960de41de960 (patch) | |
tree | 0e33d9a1f92cd7da0a2322a11078a2a18dafa1ad | |
parent | 77cfe83f7dd636845915bbb0295013a570778278 (diff) | |
download | bcm5719-llvm-0e9b5760f2c6ce6f41600b90b89a960de41de960.tar.gz bcm5719-llvm-0e9b5760f2c6ce6f41600b90b89a960de41de960.zip |
TypeRecord - fix uninitialized variable warnings. NFCI.
-rw-r--r-- | llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h b/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h index b147dd6c3d0..35f5c056113 100644 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h +++ b/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h @@ -144,7 +144,7 @@ public: ModifierOptions getModifiers() const { return Modifiers; } TypeIndex ModifiedType; - ModifierOptions Modifiers; + ModifierOptions Modifiers = ModifierOptions::None; }; // LF_PROCEDURE @@ -168,7 +168,7 @@ public: TypeIndex ReturnType; CallingConvention CallConv; FunctionOptions Options; - uint16_t ParameterCount; + uint16_t ParameterCount = 0; TypeIndex ArgumentList; }; @@ -202,9 +202,9 @@ public: TypeIndex ThisType; CallingConvention CallConv; FunctionOptions Options; - uint16_t ParameterCount; + uint16_t ParameterCount = 0; TypeIndex ArgumentList; - int32_t ThisPointerAdjustment; + int32_t ThisPointerAdjustment = 0; }; // LF_LABEL @@ -351,7 +351,7 @@ public: } TypeIndex ReferentType; - uint32_t Attrs; + uint32_t Attrs = 0; Optional<MemberPointerInfo> MemberInfo; void setAttrs(PointerKind PK, PointerMode PM, PointerOptions PO, @@ -414,7 +414,7 @@ public: TypeIndex ElementType; TypeIndex IndexType; - uint64_t Size; + uint64_t Size = 0; StringRef Name; }; @@ -459,7 +459,7 @@ public: StringRef getName() const { return Name; } StringRef getUniqueName() const { return UniqueName; } - uint16_t MemberCount; + uint16_t MemberCount = 0; ClassOptions Options; TypeIndex FieldList; StringRef Name; @@ -496,7 +496,7 @@ public: TypeIndex DerivationList; TypeIndex VTableShape; - uint64_t Size; + uint64_t Size = 0; }; // LF_UNION @@ -517,7 +517,7 @@ struct UnionRecord : public TagRecord { uint64_t getSize() const { return Size; } - uint64_t Size; + uint64_t Size = 0; }; // LF_ENUM @@ -550,8 +550,8 @@ public: uint8_t getBitSize() const { return BitSize; } TypeIndex Type; - uint8_t BitSize; - uint8_t BitOffset; + uint8_t BitSize = 0; + uint8_t BitOffset = 0; }; // LF_VTSHAPE @@ -592,7 +592,7 @@ public: StringRef getName() const { return Name; } GUID Guid; - uint32_t Age; + uint32_t Age = 0; StringRef Name; }; @@ -644,7 +644,7 @@ public: TypeIndex UDT; TypeIndex SourceFile; - uint32_t LineNumber; + uint32_t LineNumber = 0; }; // LF_UDT_MOD_SRC_LINE @@ -664,8 +664,8 @@ public: TypeIndex UDT; TypeIndex SourceFile; - uint32_t LineNumber; - uint16_t Module; + uint32_t LineNumber = 0; + uint16_t Module = 0; }; // LF_BUILDINFO @@ -717,7 +717,7 @@ public: TypeIndex CompleteClass; TypeIndex OverriddenVFTable; - uint32_t VFPtrOffset; + uint32_t VFPtrOffset = 0; std::vector<StringRef> MethodNames; }; @@ -749,7 +749,7 @@ public: TypeIndex Type; MemberAttributes Attrs; - int32_t VFTableOffset; + int32_t VFTableOffset = 0; StringRef Name; }; @@ -780,7 +780,7 @@ public: TypeIndex getMethodList() const { return MethodList; } StringRef getName() const { return Name; } - uint16_t NumOverloads; + uint16_t NumOverloads = 0; TypeIndex MethodList; StringRef Name; }; @@ -806,7 +806,7 @@ public: MemberAttributes Attrs; TypeIndex Type; - uint64_t FieldOffset; + uint64_t FieldOffset = 0; StringRef Name; }; @@ -883,7 +883,7 @@ public: MemberAttributes Attrs; TypeIndex Type; - uint64_t Offset; + uint64_t Offset = 0; }; // LF_VBCLASS, LF_IVBCLASS @@ -911,8 +911,8 @@ public: MemberAttributes Attrs; TypeIndex BaseType; TypeIndex VBPtrType; - uint64_t VBPtrOffset; - uint64_t VTableIndex; + uint64_t VBPtrOffset = 0; + uint64_t VTableIndex = 0; }; /// LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records @@ -941,9 +941,9 @@ public: uint32_t getSignature() const { return Signature; } StringRef getPrecompFilePath() const { return PrecompFilePath; } - uint32_t StartTypeIndex; - uint32_t TypesCount; - uint32_t Signature; + uint32_t StartTypeIndex = 0; + uint32_t TypesCount = 0; + uint32_t Signature = 0; StringRef PrecompFilePath; }; @@ -955,7 +955,7 @@ public: uint32_t getSignature() const { return Signature; } - uint32_t Signature; + uint32_t Signature = 0; }; } // end namespace codeview |