Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM

llvm-svn: 86213
This commit is contained in:
Victor Hernandez
2009-11-06 01:33:24 +00:00
parent 06ce6506d2
commit b9f5899779
19 changed files with 191 additions and 244 deletions

View File

@@ -2101,10 +2101,8 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
if (!Ty || !Size) return Error("Invalid MALLOC record");
if (!CurBB) return Error("Invalid malloc instruction with no BB");
const Type *Int32Ty = IntegerType::getInt32Ty(CurBB->getContext());
Constant *AllocSize = ConstantExpr::getSizeOf(Ty->getElementType());
AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, Int32Ty);
I = CallInst::CreateMalloc(CurBB, Int32Ty, Ty->getElementType(),
AllocSize, Size, NULL);
Size, NULL);
InstructionList.push_back(I);
break;
}