[llvm] r369208 - [MC] MCFixup - Fix cppcheck + MSVC analyzer uninitialized member variable warnings. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 18 06:29:12 PDT 2019
Author: rksimon
Date: Sun Aug 18 06:29:12 2019
New Revision: 369208
URL: http://llvm.org/viewvc/llvm-project?rev=369208&view=rev
Log:
[MC] MCFixup - Fix cppcheck + MSVC analyzer uninitialized member variable warnings. NFCI.
Modified:
llvm/trunk/include/llvm/MC/MCFixup.h
Modified: llvm/trunk/include/llvm/MC/MCFixup.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCFixup.h?rev=369208&r1=369207&r2=369208&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCFixup.h (original)
+++ llvm/trunk/include/llvm/MC/MCFixup.h Sun Aug 18 06:29:12 2019
@@ -78,14 +78,14 @@ class MCFixup {
/// The value to put into the fixup location. The exact interpretation of the
/// expression is target dependent, usually it will be one of the operands to
/// an instruction or an assembler directive.
- const MCExpr *Value;
+ const MCExpr *Value = nullptr;
/// The byte index of start of the relocation inside the MCFragment.
- uint32_t Offset;
+ uint32_t Offset = 0;
/// The target dependent kind of fixup item this is. The kind is used to
/// determine how the operand value should be encoded into the instruction.
- unsigned Kind;
+ unsigned Kind = 0;
/// The source location which gave rise to the fixup, if any.
SMLoc Loc;
More information about the llvm-commits
mailing list