API changes for class Use size reduction, wave 1.
[oota-llvm.git] / lib / Transforms / IPO / ConstantMerge.cpp
index 7c71065674ec798a538f6f75de871a0d91cff503..a8a1492375542620aa0296e37e87eb614f9753f6 100644 (file)
@@ -23,6 +23,7 @@
 #include "llvm/Pass.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Compiler.h"
+#include <map>
 using namespace llvm;
 
 STATISTIC(NumMerged, "Number of global constants merged");
@@ -87,10 +88,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;
         }
       }
     }