summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-19 18:49:08 +0000
committerChris Lattner <sabre@nondot.org>2008-02-19 18:49:08 +0000
commit90c2df5bd0fe375eac0f1fc671ef2bc5a6063bab (patch)
treeb984329e7ee787d3f654a769b01664f926529a79 /llvm/lib
parentfe0b5740ced6f41b7f0f67245d979c7d6663ad09 (diff)
downloadbcm5719-llvm-90c2df5bd0fe375eac0f1fc671ef2bc5a6063bab.tar.gz
bcm5719-llvm-90c2df5bd0fe375eac0f1fc671ef2bc5a6063bab.zip
random cleanups.
llvm-svn: 47334
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 4a0caada51d..a8995d6fb49 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -965,7 +965,7 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
}
}
- // COpy the target triple from the source to dest if the dest's is empty
+ // Copy the target triple from the source to dest if the dest's is empty.
if (Dest->getTargetTriple().empty() && !Src->getTargetTriple().empty())
Dest->setTargetTriple(Src->getTargetTriple());
@@ -976,7 +976,7 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
Dest->getTargetTriple() != Src->getTargetTriple())
cerr << "WARNING: Linking two modules of different target triples!\n";
- // Append the module inline asm string
+ // Append the module inline asm string.
if (!Src->getModuleInlineAsm().empty()) {
if (Dest->getModuleInlineAsm().empty())
Dest->setModuleInlineAsm(Src->getModuleInlineAsm());
@@ -988,12 +988,9 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
// Update the destination module's dependent libraries list with the libraries
// from the source module. There's no opportunity for duplicates here as the
// Module ensures that duplicate insertions are discarded.
- Module::lib_iterator SI = Src->lib_begin();
- Module::lib_iterator SE = Src->lib_end();
- while ( SI != SE ) {
+ for (Module::lib_iterator SI = Src->lib_begin(), SE = Src->lib_end();
+ SI != SE; ++SI)
Dest->addLibrary(*SI);
- ++SI;
- }
// LinkTypes - Go through the symbol table of the Src module and see if any
// types are named in the src module that are not named in the Dst module.
OpenPOWER on IntegriCloud