diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Object/YAML.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Object/YAML.cpp b/llvm/lib/Object/YAML.cpp index 4e7f0890989..5b665032bb3 100644 --- a/llvm/lib/Object/YAML.cpp +++ b/llvm/lib/Object/YAML.cpp @@ -49,6 +49,10 @@ void BinaryRef::writeAsBinary(raw_ostream &OS) const { } void BinaryRef::writeAsHex(raw_ostream &OS) const { + if (binary_size() == 0) { + OS << "\"\""; + return; + } if (DataIsHexString) { OS.write((const char *)Data.data(), Data.size()); return; |

