diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-07-25 21:29:43 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-07-25 21:29:43 +0000 |
commit | c9a1f0dcdde056a2cdbc446a9d6853684402263f (patch) | |
tree | d4b844dbeb707b7baa15e78175da16b5f76b115e /lib/VMCore | |
parent | 641588bb3e7d77a88624d5df10709a07745f1238 (diff) | |
download | external_llvm-c9a1f0dcdde056a2cdbc446a9d6853684402263f.zip external_llvm-c9a1f0dcdde056a2cdbc446a9d6853684402263f.tar.gz external_llvm-c9a1f0dcdde056a2cdbc446a9d6853684402263f.tar.bz2 |
Adjust to new Module.h interface for dependent libraries
Only write the target triple and deplibs if they are non-empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15216 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 1cdfae3..4d055e7 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -732,17 +732,21 @@ void AssemblyWriter::printModule(const Module *M) { case Module::Pointer64: Out << "target pointersize = 64\n"; break; case Module::AnyPointerSize: break; } - Out << "target triple = \"" << M->getTargetTriple() << "\"\n"; + if (M->getTargetTriple().size() > 0) + Out << "target triple = \"" << M->getTargetTriple() << "\"\n"; // Loop over the dependent libraries and emit them - Out << "deplibs = [\n"; - for (Module::const_literator LI = M->lbegin(), LE = M->lend(); LI != LE; ) { - Out << "\"" << *LI << "\""; - ++LI; - if ( LI != LE ) - Out << ",\n"; + if (M->lib_size() > 0) { + Out << "deplibs = [\n"; + for (Module::lib_iterator LI = M->lib_begin(), LE = M->lib_end(); + LI != LE; ) { + Out << "\"" << *LI << "\""; + ++LI; + if ( LI != LE ) + Out << ",\n"; + } + Out << " ]\n"; } - Out << " ]\n"; // Loop over the symbol table, emitting all named constants... printSymbolTable(M->getSymbolTable()); |