Make createVerifierPass return a FunctionPass *.
[oota-llvm.git] / lib / VMCore / Verifier.cpp
index a15733af12fac9d2249d7d3dec37dfe0eb58c6d6..ace5775a0a719556236bae5cf68d0963f818948f 100644 (file)
@@ -260,7 +260,7 @@ void Verifier::visitReturnInst(ReturnInst &RI) {
             "Function return type does not match operand "
             "type of return inst!", &RI, F->getReturnType());
 
-  // Check to make sure that the return value has neccesary properties for
+  // Check to make sure that the return value has necessary properties for
   // terminators...
   visitTerminatorInst(RI);
 }
@@ -510,6 +510,8 @@ void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) {
   Assert1(IF->isExternal(), "Intrinsic functions should never be defined!", IF);
   unsigned NumArgs = 0;
 
+  // FIXME: this should check the return type of each intrinsic as well, also
+  // arguments!
   switch (ID) {
   case LLVMIntrinsic::va_start:
     Assert1(CI.getParent()->getParent()->getFunctionType()->isVarArg(),
@@ -517,10 +519,13 @@ void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) {
             " args!", &CI);
     NumArgs = 1;
     break;
-  case LLVMIntrinsic::va_end:  NumArgs = 1; break;
-  case LLVMIntrinsic::va_copy: NumArgs = 2; break;
-  case LLVMIntrinsic::setjmp:  NumArgs = 1; break;
-  case LLVMIntrinsic::longjmp: NumArgs = 2; break;
+  case LLVMIntrinsic::va_end:          NumArgs = 1; break;
+  case LLVMIntrinsic::va_copy:         NumArgs = 2; break;
+
+  case LLVMIntrinsic::setjmp:          NumArgs = 1; break;
+  case LLVMIntrinsic::longjmp:         NumArgs = 2; break;
+  case LLVMIntrinsic::sigsetjmp:       NumArgs = 2; break;
+  case LLVMIntrinsic::siglongjmp:      NumArgs = 2; break;
  
   case LLVMIntrinsic::alpha_ctlz:      NumArgs = 1; break;
   case LLVMIntrinsic::alpha_cttz:      NumArgs = 1; break;
@@ -552,7 +557,7 @@ void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) {
 //  Implement the public interfaces to this file...
 //===----------------------------------------------------------------------===//
 
-Pass *createVerifierPass() {
+FunctionPass *createVerifierPass() {
   return new Verifier();
 }