fix pasto
[oota-llvm.git] / lib / Transforms / IPO / ConstantMerge.cpp
index c13b69fb51bc92bdd955fc1f573c04c04338019e..401a36e82e52e3c4b620bf0264888ed316009bae 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -29,7 +29,7 @@ STATISTIC(NumMerged, "Number of global constants merged");
 
 namespace {
   struct VISIBILITY_HIDDEN ConstantMerge : public ModulePass {
-    static char ID; // Pass identifcation, replacement for typeid
+    static char ID; // Pass identification, replacement for typeid
     ConstantMerge() : ModulePass((intptr_t)&ID) {}
 
     // run - For this pass, process all of the globals in the module,
@@ -87,10 +87,6 @@ bool ConstantMerge::runOnModule(Module &M) {
         } else if (GV->hasInternalLinkage()) {    // Yup, this is a duplicate!
           // Make all uses of the duplicate constant use the canonical version.
           Replacements.push_back(std::make_pair(GV, Slot));
-        } else if (GV->hasInternalLinkage()) {
-          // Make all uses of the duplicate constant use the canonical version.
-          Replacements.push_back(std::make_pair(Slot, GV));
-          Slot = GV;
         }
       }
     }