This shouldn't happen, but it's nice not to abort when printing broken machine
functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238287
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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;