diff --git a/lib/MC/MCSymbol.cpp b/lib/MC/MCSymbol.cpp index 0009decef9b..b2034eaf517 100644 --- a/lib/MC/MCSymbol.cpp +++ b/lib/MC/MCSymbol.cpp @@ -50,6 +50,10 @@ void MCSymbol::print(raw_ostream &OS) const { // some targets support quoting names with funny characters. If the name // contains a funny character, then print it quoted. StringRef Name = getName(); + if (Name.empty()) { + OS << "\"\""; + return; + } if (!NameNeedsQuoting(Name)) { OS << Name; return;