summaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/CBackend.cpp
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
commitb15fde2b787eb0af4613f6f0396f4582a0870ba6 (patch)
tree8099701db4385b398f9fc2ee7320b09fce0f2b83 /lib/Target/CBackend/CBackend.cpp
parentea8186ad62ea7f74e6bbd16bbfb6309bfab9ccf7 (diff)
downloadllvm-b15fde2b787eb0af4613f6f0396f4582a0870ba6.tar.gz
llvm-b15fde2b787eb0af4613f6f0396f4582a0870ba6.tar.bz2
llvm-b15fde2b787eb0af4613f6f0396f4582a0870ba6.tar.xz
simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r--lib/Target/CBackend/CBackend.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index af478d9bfd..683e42bdbc 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.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";