From b9f589977944fad4feaaf709cf2818ac5f98de1b Mon Sep 17 00:00:00 2001 From: Victor Hernandez Date: Fri, 6 Nov 2009 01:33:24 +0000 Subject: Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM llvm-svn: 86213 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 9916388dad1..68527e3d474 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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; } -- cgit v1.2.3