aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Writer/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode/Writer/Writer.cpp')
-rw-r--r--lib/Bytecode/Writer/Writer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 0e541df72d..308f1e9e1e 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) {