Summary: Diagnose empty symbol to avoid hitting assertion in MCContext::getOrCreateSymbol
Reviewers: eli.friedman, rengolin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26728
llvm-svn: 288390
// This is a symbol reference.
StringRef SymbolName = Identifier;
+ if (SymbolName.empty())
+ return true;
+
MCSymbolRefExpr::VariantKind Variant = MCSymbolRefExpr::VK_None;
// Lookup the symbol variant if used.
.set a, 1
.equ a, 2
.equiv a, 3
+.set b, ""
// CHECK: error: redefinition of 'a'
-
+// CHECK: error: missing expression in '.set' directive