De-constify Types in StructType::get() and TargetData::getIntPtrType().
[oota-llvm.git] / lib / Target / ARM / ARMGlobalMerge.cpp
index f8993792bc67c45054bf57349c3023e9858cd47f..8d77b2d8383e109ae3152bddbe79ea0167566cab 100644 (file)
@@ -128,10 +128,10 @@ bool ARMGlobalMerge::doMerge(SmallVectorImpl<GlobalVariable*> &Globals,
   for (size_t i = 0, e = Globals.size(); i != e; ) {
     size_t j = 0;
     uint64_t MergedSize = 0;
-    std::vector<const Type*> Tys;
+    std::vector<Type*> Tys;
     std::vector<Constant*> Inits;
     for (j = i; j != e; ++j) {
-      const Type *Ty = Globals[j]->getType()->getElementType();
+      Type *Ty = Globals[j]->getType()->getElementType();
       MergedSize += TD->getTypeAllocSize(Ty);
       if (MergedSize > MaxOffset) {
         break;