aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2004-04-14 15:06:48 +0000
committerJohn Criswell <criswell@uiuc.edu>2004-04-14 15:06:48 +0000
commit71c887d6884f32f9302bfab023c21267bb2b5a0f (patch)
tree94655312671dd96cf45f03c791863a23c37dd03b
parent17f64258cf33f4a2900299238758a746d70ecc14 (diff)
Remove the return type check for llvm.readio. This check is done for all
functions and is not needed here. Simplify the pointer type check per Chris's suggestions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12945 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Verifier.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 89017d691c..ffe2c5a548 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -644,11 +644,10 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
Assert1(FT->getNumParams() == 1,
"Illegal # arguments for intrinsic function!", IF);
- Assert1(ReturnType->isFirstClassType(),
- "Return type is not a first class type!", IF);
- Assert1(ParamType->getPrimitiveID() == Type::PointerTyID,
+ Assert1(isa<PointerType>(ParamType),
"First argument not a pointer!", IF);
- Assert1(((dyn_cast<PointerType>(ParamType)->getContainedType(0)) == ReturnType), "Pointer type doesn't match return type!", IF);
+ Assert1(((cast<PointerType>(ParamType)->getElementType()) == ReturnType),
+ "Pointer type doesn't match return type!", IF);
NumArgs = 1;
break;
}