summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2009-11-06 01:33:24 +0000
committerVictor Hernandez <vhernandez@apple.com>2009-11-06 01:33:24 +0000
commitb9f589977944fad4feaaf709cf2818ac5f98de1b (patch)
tree5eccc709a70cf26793579109c48ad3e7eca7c2be /llvm/lib/AsmParser/LLParser.cpp
parent06ce6506d2db3c42a8609d4746052fddca7e829b (diff)
downloadbcm5719-llvm-b9f589977944fad4feaaf709cf2818ac5f98de1b.tar.gz
bcm5719-llvm-b9f589977944fad4feaaf709cf2818ac5f98de1b.zip
Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM
llvm-svn: 86213
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 63af42dcca4..b53d93833aa 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3619,14 +3619,12 @@ bool LLParser::ParseAlloc(Instruction *&Inst, PerFunctionState &PFS,
// Autoupgrade old malloc instruction to malloc call.
// FIXME: Remove in LLVM 3.0.
const Type *IntPtrTy = Type::getInt32Ty(Context);
- Constant *AllocSize = ConstantExpr::getSizeOf(Ty);
- AllocSize = ConstantExpr::getTruncOrBitCast(AllocSize, IntPtrTy);
if (!MallocF)
// Prototype malloc as "void *(int32)".
// This function is renamed as "malloc" in ValidateEndOfModule().
MallocF = cast<Function>(
M->getOrInsertFunction("", Type::getInt8PtrTy(Context), IntPtrTy, NULL));
- Inst = CallInst::CreateMalloc(BB, IntPtrTy, Ty, AllocSize, Size, MallocF);
+ Inst = CallInst::CreateMalloc(BB, IntPtrTy, Ty, Size, MallocF);
return false;
}
OpenPOWER on IntegriCloud