mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 23:32:58 +00:00
Prevent an empty compaction table from being written to the bytecode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16063 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
07ea1917d0
commit
0033c18c47
@ -1034,15 +1034,19 @@ void BytecodeWriter::outputCompactionTypes(unsigned StartNo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeWriter::outputCompactionTable() {
|
void BytecodeWriter::outputCompactionTable() {
|
||||||
BytecodeBlock CTB(BytecodeFormat::CompactionTableBlockID, *this,
|
// Avoid writing the compaction table at all if there is no content.
|
||||||
true/*ElideIfEmpty*/);
|
if (Table.getCompactionTypes().size() >= Type::FirstDerivedTyID ||
|
||||||
const std::vector<std::vector<const Value*> > &CT =Table.getCompactionTable();
|
(!Table.CompactionTableIsEmpty())) {
|
||||||
|
BytecodeBlock CTB(BytecodeFormat::CompactionTableBlockID, *this,
|
||||||
// First thing is first, emit the type compaction table if there is one.
|
true/*ElideIfEmpty*/);
|
||||||
outputCompactionTypes(Type::FirstDerivedTyID);
|
const std::vector<std::vector<const Value*> > &CT =Table.getCompactionTable();
|
||||||
|
|
||||||
|
// First things first, emit the type compaction table if there is one.
|
||||||
|
outputCompactionTypes(Type::FirstDerivedTyID);
|
||||||
|
|
||||||
for (unsigned i = 0, e = CT.size(); i != e; ++i)
|
for (unsigned i = 0, e = CT.size(); i != e; ++i)
|
||||||
outputCompactionTablePlane(i, CT[i], 0);
|
outputCompactionTablePlane(i, CT[i], 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
|
void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user