summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCValue.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCValue.h')
-rw-r--r--include/llvm/MC/MCValue.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/MC/MCValue.h b/include/llvm/MC/MCValue.h
index aa1eaf022c555..ff223f70303bc 100644
--- a/include/llvm/MC/MCValue.h
+++ b/include/llvm/MC/MCValue.h
@@ -38,11 +38,12 @@ class raw_ostream;
/// Note that this class must remain a simple POD value class, because we need
/// it to live in unions etc.
class MCValue {
- const MCSymbolRefExpr *SymA, *SymB;
- int64_t Cst;
- uint32_t RefKind;
+ const MCSymbolRefExpr *SymA = nullptr, *SymB = nullptr;
+ int64_t Cst = 0;
+ uint32_t RefKind = 0;
+
public:
- MCValue() : SymA(nullptr), SymB(nullptr), Cst(0), RefKind(0) {}
+ MCValue() = default;
int64_t getConstant() const { return Cst; }
const MCSymbolRefExpr *getSymA() const { return SymA; }
const MCSymbolRefExpr *getSymB() const { return SymB; }