[llvm] 673f2f7 - msgpack: Improve error for empty node
    Sebastian Neubauer via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Oct 27 05:06:09 PDT 2020
    
    
  
Author: Sebastian Neubauer
Date: 2020-10-27T12:57:00+01:00
New Revision: 673f2f702b03be8c003889cbb5923e111c3e24d0
URL: https://github.com/llvm/llvm-project/commit/673f2f702b03be8c003889cbb5923e111c3e24d0
DIFF: https://github.com/llvm/llvm-project/commit/673f2f702b03be8c003889cbb5923e111c3e24d0.diff
LOG: msgpack: Improve error for empty node
Added: 
    
Modified: 
    llvm/lib/BinaryFormat/MsgPackDocument.cpp
Removed: 
    
################################################################################
diff  --git a/llvm/lib/BinaryFormat/MsgPackDocument.cpp b/llvm/lib/BinaryFormat/MsgPackDocument.cpp
index 53720c542e14..81ea4cee1a9d 100644
--- a/llvm/lib/BinaryFormat/MsgPackDocument.cpp
+++ b/llvm/lib/BinaryFormat/MsgPackDocument.cpp
@@ -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) {
     }
   }
 }
-
        
    
    
More information about the llvm-commits
mailing list