Index: llvm/lib/TableGen/DetailedRecordsBackend.cpp =================================================================== --- llvm/lib/TableGen/DetailedRecordsBackend.cpp +++ llvm/lib/TableGen/DetailedRecordsBackend.cpp @@ -104,7 +104,9 @@ for (const auto &RecPair : RecordList) { auto *const Rec = RecPair.second.get(); - OS << formatv("\n{0} |{1}|\n", Rec->getNameInitAsString(), + std::string Name = Rec->getNameInitAsString(); + OS << formatv("\n{0} |{1}|\n", + (Name.size() == 0) ? "\"\"" : Name, SrcMgr.getFormattedLocationNoOffset(Rec->getLoc().front())); printDefms(Rec, OS); printSuperclasses(Rec, OS);