Skip to content

Commit c956f91

Browse files
committed
[RISCV][MC][MSan] Fix uninitialized data members
Added in a0d8a53. Some fields are not always initialized.
1 parent 9a807b8 commit c956f91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class RISCVELFStreamer : public MCELFStreamer {
2222

2323
enum ElfMappingSymbol { EMS_None, EMS_Instructions, EMS_Data };
2424

25-
int64_t MappingSymbolCounter;
25+
int64_t MappingSymbolCounter = 0;
2626
DenseMap<const MCSection *, ElfMappingSymbol> LastMappingSymbols;
27-
ElfMappingSymbol LastEMS;
27+
ElfMappingSymbol LastEMS = EMS_None;
2828

2929
public:
3030
RISCVELFStreamer(MCContext &C, std::unique_ptr<MCAsmBackend> MAB,

0 commit comments

Comments
 (0)