diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index 0e541df72d0..308f1e9e1ef 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -236,6 +236,10 @@ void BytecodeWriter::outputFunction(const Function *F) { } void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) { + // Do not output the Bytecode block for an empty symbol table, it just wastes + // space! + if (MST.begin() == MST.end()) return; + BytecodeBlock FunctionBlock(BytecodeFormat::SymbolTable, Out); for (SymbolTable::const_iterator TI = MST.begin(); TI != MST.end(); ++TI) {