[llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Verifier.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat May 17 17:28:40 PDT 2003
Changes in directory llvm/lib/VMCore:
Function.cpp updated: 1.38 -> 1.39
Verifier.cpp updated: 1.49 -> 1.50
---
Log message:
Add support for setjmp/longjmp primitives
Patch checked in for Bill Wendling :)
---
Diffs of the changes:
Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.38 llvm/lib/VMCore/Function.cpp:1.39
--- llvm/lib/VMCore/Function.cpp:1.38 Wed May 7 22:47:33 2003
+++ llvm/lib/VMCore/Function.cpp Sat May 17 17:26:33 2003
@@ -164,20 +164,16 @@
return 0; // All intrinsics start with 'llvm.'
switch (getName()[5]) {
+ case 'l':
+ if (getName() == "llvm.longjmp") return LLVMIntrinsic::longjmp;
+ break;
+ case 's':
+ if (getName() == "llvm.setjmp") return LLVMIntrinsic::setjmp;
+ break;
case 'v':
- if (getName().size() >= 9) {
- switch (getName()[8]) {
- case 's':
- if (getName() == "llvm.va_start") return LLVMIntrinsic::va_start;
- break;
- case 'e':
- if (getName() == "llvm.va_end") return LLVMIntrinsic::va_end;
- break;
- case 'c':
- if (getName() == "llvm.va_copy") return LLVMIntrinsic::va_copy;
- break;
- }
- }
+ if (getName() == "llvm.va_copy") return LLVMIntrinsic::va_copy;
+ if (getName() == "llvm.va_end") return LLVMIntrinsic::va_end;
+ if (getName() == "llvm.va_start") return LLVMIntrinsic::va_start;
break;
}
// The "llvm." namespace is reserved!
Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.49 llvm/lib/VMCore/Verifier.cpp:1.50
--- llvm/lib/VMCore/Verifier.cpp:1.49 Thu May 8 10:55:31 2003
+++ llvm/lib/VMCore/Verifier.cpp Sat May 17 17:26:33 2003
@@ -517,8 +517,10 @@
" args!", &CI);
NumArgs = 1;
break;
- case LLVMIntrinsic::va_end: 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::not_intrinsic:
assert(0 && "Invalid intrinsic!"); NumArgs = 0; break;
}
More information about the llvm-commits
mailing list