Change the interface to constant expressions to allow automatic folding

llvm-svn: 5793
diff --git a/llvm/lib/Transforms/IPO/FunctionResolution.cpp b/llvm/lib/Transforms/IPO/FunctionResolution.cpp
index 734b62b..932cdf4 100644
--- a/llvm/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionResolution.cpp
@@ -207,7 +207,7 @@
   std::vector<Constant*> Args;
   Args.push_back(Constant::getNullValue(Type::LongTy));
   Args.push_back(Constant::getNullValue(Type::LongTy));
-  ConstantExpr *Replacement =
+  Constant *Replacement =
     ConstantExpr::getGetElementPtr(ConstantPointerRef::get(Concrete), Args);
   
   for (unsigned i = 0; i != Globals.size(); ++i)
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 38494f2..70fc952 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -1011,7 +1011,7 @@
       Indices.push_back(cast<Constant>(*I));
 
     if (I == E) {  // If they are all constants...
-      ConstantExpr *CE =
+      Constant *CE =
         ConstantExpr::getGetElementPtr(ConstantPointerRef::get(GV), Indices);
 
       // Replace all uses of the GEP with the new constexpr...