diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-07-25 21:44:54 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-07-25 21:44:54 +0000 |
commit | cddc86f27c822af960fc8d344a86a63fce6eab76 (patch) | |
tree | 75a2965ff10408a09447118c67a650d0657132c8 /lib/VMCore | |
parent | ada1618afa714a420d83f963a59cc16fd1fda300 (diff) | |
download | llvm-cddc86f27c822af960fc8d344a86a63fce6eab76.tar.gz llvm-cddc86f27c822af960fc8d344a86a63fce6eab76.tar.bz2 llvm-cddc86f27c822af960fc8d344a86a63fce6eab76.tar.xz |
Avoid use of size(), which counts, in favor of other mechanisms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 4d055e786a..df5cabc756 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -732,14 +732,15 @@ void AssemblyWriter::printModule(const Module *M) { case Module::Pointer64: Out << "target pointersize = 64\n"; break; case Module::AnyPointerSize: break; } - if (M->getTargetTriple().size() > 0) + if (!M->getTargetTriple().empty()) Out << "target triple = \"" << M->getTargetTriple() << "\"\n"; // Loop over the dependent libraries and emit them - if (M->lib_size() > 0) { + Module::lib_iterator LI= M->lib_begin(); + Module::lib_iterator LE= M->lib_end(); + if (LI != LE) { Out << "deplibs = [\n"; - for (Module::lib_iterator LI = M->lib_begin(), LE = M->lib_end(); - LI != LE; ) { + while ( LI != LE ) { Out << "\"" << *LI << "\""; ++LI; if ( LI != LE ) |