mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
remove calls to calloc if the allocated memory is not used (it was already being done for malloc)
fix a few typos found by Chad in my previous commit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -182,7 +182,7 @@ Value *llvm::getMallocArraySize(CallInst *CI, const TargetData *TD,
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// clloc Call Utility Functions.
|
||||
// calloc Call Utility Functions.
|
||||
//
|
||||
|
||||
static bool isCallocCall(const CallInst *CI) {
|
||||
@ -197,7 +197,7 @@ static bool isCallocCall(const CallInst *CI) {
|
||||
|
||||
// Check malloc prototype.
|
||||
// FIXME: workaround for PR5130, this will be obsolete when a nobuiltin
|
||||
// attribute will exist.
|
||||
// attribute exists.
|
||||
FunctionType *FTy = Callee->getFunctionType();
|
||||
return FTy->getReturnType() == Type::getInt8PtrTy(FTy->getContext()) &&
|
||||
FTy->getNumParams() == 2 &&
|
||||
|
Reference in New Issue
Block a user