msgpack: Improve error for empty node
authorSebastian Neubauer <sebastian.neubauer@amd.com>
Tue, 27 Oct 2020 10:30:01 +0000 (11:30 +0100)
committerSebastian Neubauer <sebastian.neubauer@amd.com>
Tue, 27 Oct 2020 11:57:00 +0000 (12:57 +0100)
llvm/lib/BinaryFormat/MsgPackDocument.cpp

index 53720c5..81ea4ce 100644 (file)
@@ -277,6 +277,8 @@ void Document::writeToBlob(std::string &Blob) {
     case Type::String:
       MPWriter.write(Node.getString());
       break;
+    case Type::Empty:
+      llvm_unreachable("unhandled empty msgpack node");
     default:
       llvm_unreachable("unhandled msgpack object kind");
     }
@@ -310,4 +312,3 @@ void Document::writeToBlob(std::string &Blob) {
     }
   }
 }
-