Fix -Asserts warning.

llvm-svn: 81580
This commit is contained in:
Daniel Dunbar 2009-09-11 22:07:31 +00:00
parent 7020eae076
commit b918900995
1 changed files with 2 additions and 2 deletions

View File

@ -516,8 +516,8 @@ static Value *createMalloc(Instruction *InsertBefore, BasicBlock *InsertAtEnd,
MCall->setTailCall();
// Create a cast instruction to convert to the right type...
const Type* VoidT = Type::getVoidTy(BB->getContext());
assert(MCall->getType() != VoidT && "Malloc has void return type");
assert(MCall->getType() != Type::getVoidTy(BB->getContext()) &&
"Malloc has void return type");
Value *MCast;
if (InsertBefore)
MCast = new BitCastInst(MCall, AllocPtrType, NameStr, InsertBefore);