[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

LLVM llvm at cs.uiuc.edu
Thu May 27 15:22:01 PDT 2004


Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.64 -> 1.65

---
Log message:

Use the SymbolTable::isEmpty() method instead of checking for no value
planes. A SymbolTable could still have types in it! This fixes problems
with two regression tests that failed because a symbol table that only
contained types was being omitted from bytecode files. Thanks to Chris
for the reduced test case that helped find this immediately.


---
Diffs of the changes:  (+1 -1)

Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.64 llvm/lib/Bytecode/Writer/Writer.cpp:1.65
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.64	Wed May 26 02:37:11 2004
+++ llvm/lib/Bytecode/Writer/Writer.cpp	Thu May 27 15:18:51 2004
@@ -307,7 +307,7 @@
 void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
   // Do not output the Bytecode block for an empty symbol table, it just wastes
   // space!
-  if (MST.plane_begin() == MST.plane_end()) return;
+  if ( MST.isEmpty() ) return;
 
   BytecodeBlock SymTabBlock(BytecodeFormat::SymbolTable, Out,
                             true/* ElideIfEmpty*/);





More information about the llvm-commits mailing list