Skip to content

Commit

Permalink
SymbolRecord - fix more uninitialized variable warnings. NFCI.
Browse files Browse the repository at this point in the history
  • Loading branch information
RKSimon committed Nov 3, 2019
1 parent 604cbd6 commit 3823759
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Thunk32Sym : public SymbolRecord {
uint32_t Offset = 0;
uint16_t Segment = 0;
uint16_t Length = 0;
ThunkOrdinal Thunk;
ThunkOrdinal Thunk = ThunkOrdinal::Standard;
StringRef Name;
ArrayRef<uint8_t> VariantData;

Expand Down Expand Up @@ -159,7 +159,7 @@ class CallerSym : public SymbolRecord {
struct DecodedAnnotation {
StringRef Name;
ArrayRef<uint8_t> Bytes;
BinaryAnnotationsOpCode OpCode;
BinaryAnnotationsOpCode OpCode = BinaryAnnotationsOpCode::Invalid;
uint32_t U1 = 0;
uint32_t U2 = 0;
int32_t S1 = 0;
Expand Down Expand Up @@ -407,21 +407,21 @@ class LocalSym : public SymbolRecord {
: SymbolRecord(SymbolRecordKind::LocalSym), RecordOffset(RecordOffset) {}

TypeIndex Type;
LocalSymFlags Flags;
LocalSymFlags Flags = LocalSymFlags::None;
StringRef Name;

uint32_t RecordOffset = 0;
};

struct LocalVariableAddrRange {
uint32_t OffsetStart;
uint16_t ISectStart;
uint16_t Range;
uint32_t OffsetStart = 0;
uint16_t ISectStart = 0;
uint16_t Range = 0;
};

struct LocalVariableAddrGap {
uint16_t GapStartOffset;
uint16_t Range;
uint16_t GapStartOffset = 0;
uint16_t Range = 0;
};

enum : uint16_t { MaxDefRange = 0xf000 };
Expand Down Expand Up @@ -628,7 +628,7 @@ class LabelSym : public SymbolRecord {

uint32_t CodeOffset = 0;
uint16_t Segment = 0;
ProcSymFlags Flags;
ProcSymFlags Flags = ProcSymFlags::None;
StringRef Name;

uint32_t RecordOffset = 0;
Expand Down Expand Up @@ -670,7 +670,7 @@ class ExportSym : public SymbolRecord {
: SymbolRecord(SymbolRecordKind::ExportSym), RecordOffset(RecordOffset) {}

uint16_t Ordinal = 0;
ExportFlags Flags;
ExportFlags Flags = ExportFlags::None;
StringRef Name;

uint32_t RecordOffset = 0;
Expand All @@ -686,7 +686,7 @@ class FileStaticSym : public SymbolRecord {

TypeIndex Index;
uint32_t ModFilenameOffset = 0;
LocalSymFlags Flags;
LocalSymFlags Flags = LocalSymFlags::None;
StringRef Name;

uint32_t RecordOffset = 0;
Expand All @@ -700,7 +700,7 @@ class Compile2Sym : public SymbolRecord {
: SymbolRecord(SymbolRecordKind::Compile2Sym),
RecordOffset(RecordOffset) {}

CompileSym2Flags Flags;
CompileSym2Flags Flags = CompileSym2Flags::None;
CPUType Machine;
uint16_t VersionFrontendMajor = 0;
uint16_t VersionFrontendMinor = 0;
Expand All @@ -726,7 +726,7 @@ class Compile3Sym : public SymbolRecord {
: SymbolRecord(SymbolRecordKind::Compile3Sym),
RecordOffset(RecordOffset) {}

CompileSym3Flags Flags;
CompileSym3Flags Flags = CompileSym3Flags::None;
CPUType Machine;
uint16_t VersionFrontendMajor = 0;
uint16_t VersionFrontendMinor = 0;
Expand Down Expand Up @@ -771,7 +771,7 @@ class FrameProcSym : public SymbolRecord {
uint32_t BytesOfCalleeSavedRegisters = 0;
uint32_t OffsetOfExceptionHandler = 0;
uint16_t SectionIdOfExceptionHandler = 0;
FrameProcedureOptions Flags;
FrameProcedureOptions Flags = FrameProcedureOptions::None;

/// Extract the register this frame uses to refer to local variables.
RegisterId getLocalFramePtrReg(CPUType CPU) const {
Expand Down

0 comments on commit 3823759

Please sign in to comment.