aboutsummaryrefslogtreecommitdiffstats
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
commit6ed81e253cbfb4a42ee9cf0d25d2756548a11f7d (patch)
tree817a5ede93f38cc63bd812d5d98769229dbcc538
parent12fe669203935d01cc95b1168fc987eaa19e2186 (diff)
downloadexternal_llvm-6ed81e253cbfb4a42ee9cf0d25d2756548a11f7d.zip
external_llvm-6ed81e253cbfb4a42ee9cf0d25d2756548a11f7d.tar.gz
external_llvm-6ed81e253cbfb4a42ee9cf0d25d2756548a11f7d.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13842 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Bytecode/Writer/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index d139a6f..5b6fdd7 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/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*/);