Introduce a new technique for merging BasicBlock with Instruction sentinel by superpo...
[oota-llvm.git] / lib / Target / DarwinTargetAsmInfo.cpp
index 57e70148f481fbb8728a3752bfefa7db9d75d5fa..cc05c09c5170a1b401706e4317e49f11410b98de 100644 (file)
@@ -115,9 +115,9 @@ const Section*
 DarwinTargetAsmInfo::MergeableStringSection(const GlobalVariable *GV) const {
   const TargetData *TD = TM.getTargetData();
   Constant *C = cast<GlobalVariable>(GV)->getInitializer();
-  const Type *Type = cast<ConstantArray>(C)->getType()->getElementType();
+  const Type *Ty = cast<ArrayType>(C->getType())->getElementType();
 
-  unsigned Size = TD->getTypePaddedSize(Type);
+  unsigned Size = TD->getTypePaddedSize(Ty);
   if (Size) {
     unsigned Align = TD->getPreferredAlignment(GV);
     if (Align <= 32)