X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FIR%2FVerifier.cpp;h=7001c556d2006452de14d6cc3fe28a4314bcc3a0;hp=e14f1036912eec6717cfcff6ff67f502c47d20dd;hb=93a23a3bd468b78a9f550a21d70ce2525962f235;hpb=d1807ff318abd0edb1079013b9856e33f690d781 diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index e14f1036912..7001c556d20 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -2120,7 +2120,11 @@ void Verifier::VerifyCallSite(CallSite CS) { Assert(FPTy->getElementType()->isFunctionTy(), "Called function is not pointer to function type!", I); - FunctionType *FTy = cast(FPTy->getElementType()); + + Assert(FPTy->getElementType() == CS.getFunctionType(), + "Called function is not the same type as the call!", I); + + FunctionType *FTy = CS.getFunctionType(); // Verify that the correct number of arguments are being passed if (FTy->isVarArg())