[llvm-commits] [llvm] r81580 - /llvm/trunk/lib/VMCore/Instructions.cpp

Daniel Dunbar daniel at zuster.org
Fri Sep 11 15:07:32 PDT 2009


Author: ddunbar
Date: Fri Sep 11 17:07:31 2009
New Revision: 81580

URL: http://llvm.org/viewvc/llvm-project?rev=81580&view=rev
Log:
Fix -Asserts warning.

Modified:
    llvm/trunk/lib/VMCore/Instructions.cpp

Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=81580&r1=81579&r2=81580&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Fri Sep 11 17:07:31 2009
@@ -516,8 +516,8 @@
   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);





More information about the llvm-commits mailing list