aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCExpr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCExpr.h')
-rw-r--r--include/llvm/MC/MCExpr.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/MC/MCExpr.h b/include/llvm/MC/MCExpr.h
index 195762e..6f156b2 100644
--- a/include/llvm/MC/MCExpr.h
+++ b/include/llvm/MC/MCExpr.h
@@ -204,7 +204,9 @@ private:
const VariantKind Kind;
explicit MCSymbolRefExpr(const MCSymbol *_Symbol, VariantKind _Kind)
- : MCExpr(MCExpr::SymbolRef), Symbol(_Symbol), Kind(_Kind) {}
+ : MCExpr(MCExpr::SymbolRef), Symbol(_Symbol), Kind(_Kind) {
+ assert(Symbol);
+ }
public:
/// @name Construction