Attributes Rewrite
[oota-llvm.git] / lib / Transforms / IPO / IPConstantPropagation.cpp
index 25c01346642bc01c307901b406487530b00616c0..d757e1fdb1daba03c9dd8abde0e8b395361738e1 100644 (file)
@@ -167,7 +167,7 @@ bool IPCP::PropagateConstantReturn(Function &F) {
     
   // Check to see if this function returns a constant.
   SmallVector<Value *,4> RetVals;
-  const StructType *STy = dyn_cast<StructType>(F.getReturnType());
+  StructType *STy = dyn_cast<StructType>(F.getReturnType());
   if (STy)
     for (unsigned i = 0, e = STy->getNumElements(); i < e; ++i) 
       RetVals.push_back(UndefValue::get(STy->getElementType(i)));