summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-06 02:28:23 +0000
committerChris Lattner <sabre@nondot.org>2005-03-06 02:28:23 +0000
commitc9b09846666d6fdaf180ba564926c0bbc547eb10 (patch)
tree40e01d1be2a6dffd66de97fedbba342d9e55e3e3 /llvm/lib
parent8344ba0dac91a3643304bca7ee123cc3d2d62d6b (diff)
downloadbcm5719-llvm-c9b09846666d6fdaf180ba564926c0bbc547eb10.tar.gz
bcm5719-llvm-c9b09846666d6fdaf180ba564926c0bbc547eb10.zip
simplify some code.
llvm-svn: 20471
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/CBackend/Writer.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp
index af478d9bfdb..683e42bdbc8 100644
--- a/llvm/lib/Target/CBackend/Writer.cpp
+++ b/llvm/lib/Target/CBackend/Writer.cpp
@@ -990,13 +990,12 @@ void CWriter::printFloatingPointConstants(Function &F) {
/// type name is found, emit it's declaration...
///
void CWriter::printModuleTypes(const SymbolTable &ST) {
- // If there are no type names, exit early.
- if ( ! ST.hasTypes() )
- return;
-
- // We are only interested in the type plane of the symbol table...
+ // We are only interested in the type plane of the symbol table.
SymbolTable::type_const_iterator I = ST.type_begin();
SymbolTable::type_const_iterator End = ST.type_end();
+
+ // If there are no type names, exit early.
+ if (I == End) return;
// Print out forward declarations for structure types before anything else!
Out << "/* Structure forward decls */\n";
OpenPOWER on IntegriCloud