Fix a typo that led to a failure to correctly verify bitcast instructions.
authorNick Lewycky <nicholas@mxc.ca>
Wed, 15 Aug 2012 02:37:07 +0000 (02:37 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Wed, 15 Aug 2012 02:37:07 +0000 (02:37 +0000)
Patch by Stephen Hines!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161921 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Verifier.cpp

index 68512462819846a8dc8a0e8d5271192b4d0543f5..38914b3fe7ec2541ab49e0f89a54f0843bcf9c5f 100644 (file)
@@ -1093,7 +1093,7 @@ void Verifier::visitBitCastInst(BitCastInst &I) {
 
   // BitCast implies a no-op cast of type only. No bits change.
   // However, you can't cast pointers to anything but pointers.
-  Assert1(DestTy->isPointerTy() == DestTy->isPointerTy(),
+  Assert1(SrcTy->isPointerTy() == DestTy->isPointerTy(),
           "Bitcast requires both operands to be pointer or neither", &I);
   Assert1(SrcBitSize == DestBitSize, "Bitcast requires types of same width",&I);