Use dyn_cast instead of cast.
authorBill Wendling <isanbard@gmail.com>
Wed, 19 Nov 2008 01:25:41 +0000 (01:25 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 19 Nov 2008 01:25:41 +0000 (01:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59577 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Verifier.cpp

index 43ecf65f7e43b639ab5f817e65fd4fb48912167f..21646840e4c18d6e22566867a192a7b47d2eef36 100644 (file)
@@ -1396,7 +1396,7 @@ bool Verifier::PerformTypeCheck(Intrinsic::ID ID, Function *F, const Type *Ty,
   if (VT < 0) {
     int Match = ~VT;
     const Type *RetTy = FTy->getReturnType();
-    const StructType *ST = cast<StructType>(RetTy);
+    const StructType *ST = dyn_cast<StructType>(RetTy);
     unsigned NumRets = 1;
 
     if (ST)