[llvm] r306188 - Fix use of uninitialized value.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 17:18:17 PDT 2017
Author: rafael
Date: Fri Jun 23 19:18:15 2017
New Revision: 306188
URL: http://llvm.org/viewvc/llvm-project?rev=306188&view=rev
Log:
Fix use of uninitialized value.
Modified:
llvm/trunk/include/llvm/MC/MCValue.h
Modified: llvm/trunk/include/llvm/MC/MCValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCValue.h?rev=306188&r1=306187&r2=306188&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCValue.h (original)
+++ llvm/trunk/include/llvm/MC/MCValue.h Fri Jun 23 19:18:15 2017
@@ -42,7 +42,7 @@ class MCValue {
int64_t Cst;
uint32_t RefKind;
public:
-
+ MCValue() : SymA(nullptr), SymB(nullptr), Cst(0), RefKind(0) {}
int64_t getConstant() const { return Cst; }
const MCSymbolRefExpr *getSymA() const { return SymA; }
const MCSymbolRefExpr *getSymB() const { return SymB; }
More information about the llvm-commits
mailing list