diff options
| -rw-r--r-- | llvm/lib/Analysis/MallocHelper.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/VMCore/Verifier.cpp | 10 | 
2 files changed, 1 insertions, 11 deletions
diff --git a/llvm/lib/Analysis/MallocHelper.cpp b/llvm/lib/Analysis/MallocHelper.cpp index 9c1671d3064..ab6239e55ad 100644 --- a/llvm/lib/Analysis/MallocHelper.cpp +++ b/llvm/lib/Analysis/MallocHelper.cpp @@ -155,7 +155,7 @@ const PointerType* llvm::getMallocType(const CallInst* CI) {    if (BCI && CI->hasOneUse())      return cast<PointerType>(BCI->getDestTy()); -  // Malloc call was not bitcast, so the type is the malloc's return type, i8*. +  // Malloc call was not bitcast, so type is the malloc function's return type.    if (!BCI)      return cast<PointerType>(CI->getType()); diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index f1f6e2e199b..140e6bd8b15 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/lib/VMCore/Verifier.cpp @@ -1143,16 +1143,6 @@ void Verifier::visitCallInst(CallInst &CI) {    if (Function *F = CI.getCalledFunction())      if (Intrinsic::ID ID = (Intrinsic::ID)F->getIntrinsicID())        visitIntrinsicFunctionCall(ID, CI); - -  // Code here matches isMalloc from MallocHelper, which is not in VMCore. -  const Module* M = CI.getParent()->getParent()->getParent(); -  Constant *MallocFunc = M->getFunction("malloc"); - -  if (CI.getOperand(0) == MallocFunc) { -    const PointerType *PTy = -        PointerType::getUnqual(Type::getInt8Ty(CI.getParent()->getContext())); -    Assert1(CI.getType() == PTy, "Malloc call must return i8*", &CI); -  }  }  void Verifier::visitInvokeInst(InvokeInst &II) {  | 

