[llvm-branch-commits] [llvm-branch] r134385 - /llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp

Chris Lattner sabre at nondot.org
Mon Jul 4 14:08:07 PDT 2011


Author: lattner
Date: Mon Jul  4 16:08:07 2011
New Revision: 134385

URL: http://llvm.org/viewvc/llvm-project?rev=134385&view=rev
Log:
tidy up a bit.

Modified:
    llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp

Modified: llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp?rev=134385&r1=134384&r2=134385&view=diff
==============================================================================
--- llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp (original)
+++ llvm/branches/type-system-rewrite/lib/Linker/LinkModules.cpp Mon Jul  4 16:08:07 2011
@@ -174,7 +174,7 @@
     
     
     bool linkAppendingVars(GlobalVariable *DstGV, const GlobalVariable *SrcGV);
-    bool linkGlobals();
+    bool linkGlobalProtos();
     bool linkFunctionProtos();
     bool linkAliases();
     
@@ -300,7 +300,7 @@
   return false;
 }
 
-/// LinkAppendingVars - If there were any appending global variables, link them
+/// linkAppendingVars - If there were any appending global variables, link them
 /// together now.  Return true on error.
 bool ModuleLinker::linkAppendingVars(GlobalVariable *DstGV,
                                      const GlobalVariable *SrcGV) {
@@ -373,9 +373,9 @@
 }
 
 
-// linkGlobals - Loop through the global variables in the src module and merge
-// them into the dest module.
-bool ModuleLinker::linkGlobals() {
+/// linkGlobalProtos - Loop through the global variables in the src module and
+/// merge them into the dest module.
+bool ModuleLinker::linkGlobalProtos() {
   // Loop over all of the globals in the src module, mapping them over as we go
   for (Module::const_global_iterator I = SrcM->global_begin(),
        E = SrcM->global_end(); I != E; ++I) {
@@ -826,8 +826,8 @@
         DGVar->setInitializer(SInit);
     } else {
       // Destination is alias, the only valid situation is when source is
-      // weak. Also, note, that we already checked linkage in LinkGlobals(),
-      // thus we assert here.
+      // weak.  Also, note, that we already checked linkage in
+      // linkGlobalProtos(), thus we assert here.
       // FIXME: Should we weaken this assumption, 'dereference' alias and
       // check for initializer of aliasee?
       assert(SGV->isWeakForLinker());
@@ -978,7 +978,7 @@
 
   // Insert all of the globals in src into the DstM module... without linking
   // initializers (which could refer to functions not yet mapped over).
-  if (linkGlobals())
+  if (linkGlobalProtos())
     return true;
 
   // Link the functions together between the two modules, without doing function





More information about the llvm-branch-commits mailing list