projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Recommit r235458: [opaque pointer type] Avoid using PointerType::getElementType for...
[oota-llvm.git]
/
lib
/
IR
/
Verifier.cpp
diff --git
a/lib/IR/Verifier.cpp
b/lib/IR/Verifier.cpp
index e14f1036912eec6717cfcff6ff67f502c47d20dd..7001c556d2006452de14d6cc3fe28a4314bcc3a0 100644
(file)
--- 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);
Assert(FPTy->getElementType()->isFunctionTy(),
"Called function is not pointer to function type!", I);
- FunctionType *FTy = cast<FunctionType>(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())
// Verify that the correct number of arguments are being passed
if (FTy->isVarArg())