forked from OSchip/llvm-project
Add intrinsics for the llvm.sig(set|long)jmp functions
llvm-svn: 7949
This commit is contained in:
parent
71f6543c0e
commit
748e9e143b
|
@ -23,6 +23,8 @@ namespace LLVMIntrinsic {
|
|||
|
||||
setjmp, // Used to represent a setjmp call in C
|
||||
longjmp, // Used to represent a longjmp call in C
|
||||
sigsetjmp, // Used to represent a sigsetjmp call in C
|
||||
siglongjmp, // Used to represent a siglongjmp call in C
|
||||
|
||||
//===------------------------------------------------------------------===//
|
||||
// This section defines intrinsic functions used to represent Alpha
|
||||
|
|
|
@ -198,7 +198,9 @@ unsigned Function::getIntrinsicID() const {
|
|||
if (getName() == "llvm.longjmp") return LLVMIntrinsic::longjmp;
|
||||
break;
|
||||
case 's':
|
||||
if (getName() == "llvm.setjmp") return LLVMIntrinsic::setjmp;
|
||||
if (getName() == "llvm.setjmp") return LLVMIntrinsic::setjmp;
|
||||
if (getName() == "llvm.sigsetjmp") return LLVMIntrinsic::sigsetjmp;
|
||||
if (getName() == "llvm.siglongjmp") return LLVMIntrinsic::siglongjmp;
|
||||
break;
|
||||
case 'v':
|
||||
if (getName() == "llvm.va_copy") return LLVMIntrinsic::va_copy;
|
||||
|
|
|
@ -517,10 +517,12 @@ 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;
|
||||
|
|
Loading…
Reference in New Issue