summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-05-27 20:18:51 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-05-27 20:18:51 +0000
commitf2f34b3052d619574f7a6ffe69c50b5c20b891f3 (patch)
tree5c9d5ffa87fe9643354399422a54bff6c773fefb /llvm/lib/Bytecode/Writer
parent781479c7d781fbf2f1780cfa49e40fd9b0a82cbd (diff)
downloadbcm5719-llvm-f2f34b3052d619574f7a6ffe69c50b5c20b891f3.tar.gz
bcm5719-llvm-f2f34b3052d619574f7a6ffe69c50b5c20b891f3.zip
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. llvm-svn: 13842
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r--llvm/lib/Bytecode/Writer/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp
index d139a6f3098..5b6fdd79004 100644
--- a/llvm/lib/Bytecode/Writer/Writer.cpp
+++ b/llvm/lib/Bytecode/Writer/Writer.cpp
@@ -307,7 +307,7 @@ void BytecodeWriter::outputCompactionTable() {
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*/);
OpenPOWER on IntegriCloud