Index: lib/MC/MCParser/AsmParser.cpp =================================================================== --- lib/MC/MCParser/AsmParser.cpp +++ lib/MC/MCParser/AsmParser.cpp @@ -973,6 +973,9 @@ // 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. Index: test/MC/AsmParser/equ.s =================================================================== --- test/MC/AsmParser/equ.s +++ test/MC/AsmParser/equ.s @@ -5,5 +5,6 @@ .set a, 1 .equ a, 2 .equiv a, 3 +.set b, "" // CHECK: error: redefinition of 'a' - +// CHECK: error: missing expression in '.set' directive