Revert "[opaque pointer type] Avoid using PointerType::getElementType for a few cases...
[oota-llvm.git] / lib / IR / Verifier.cpp
index 7001c556d2006452de14d6cc3fe28a4314bcc3a0..e14f1036912eec6717cfcff6ff67f502c47d20dd 100644 (file)
@@ -2120,11 +2120,7 @@ void Verifier::VerifyCallSite(CallSite CS) {
 
   Assert(FPTy->getElementType()->isFunctionTy(),
          "Called function is not pointer to function type!", I);
-
-  Assert(FPTy->getElementType() == CS.getFunctionType(),
-         "Called function is not the same type as the call!", I);
-
-  FunctionType *FTy = CS.getFunctionType();
+  FunctionType *FTy = cast<FunctionType>(FPTy->getElementType());
 
   // Verify that the correct number of arguments are being passed
   if (FTy->isVarArg())