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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 5675b2af49..6467921d05 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -164,7 +164,8 @@ void BytecodeWriter::outputConstantsInPlane(const std::vector<const Value*>
void BytecodeWriter::outputConstants(bool isFunction) {
ConstantTotalBytes -= Out.size();
if (isFunction) FunctionConstantTotalBytes -= Out.size();
- BytecodeBlock CPool(BytecodeFormat::ConstantPool, Out);
+ BytecodeBlock CPool(BytecodeFormat::ConstantPool, Out,
+ true /* Elide block if empty */);
unsigned NumPlanes = Table.getNumPlanes();
@@ -286,7 +287,8 @@ void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
SymTabBytes -= Out.size();
- BytecodeBlock SymTabBlock(BytecodeFormat::SymbolTable, Out);
+ BytecodeBlock SymTabBlock(BytecodeFormat::SymbolTable, Out,
+ true/* ElideIfEmpty*/);
for (SymbolTable::const_iterator TI = MST.begin(); TI != MST.end(); ++TI) {
SymbolTable::type_const_iterator I = MST.type_begin(TI->first);