[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat May 17 17:27:50 PDT 2003
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.87 -> 1.88
---
Log message:
Add support for setjmp/longjmp primitives
Patch checked in for Bill Wendling :)
---
Diffs of the changes:
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.87 llvm/lib/CWriter/Writer.cpp:1.88
--- llvm/lib/CWriter/Writer.cpp:1.87 Wed May 14 12:50:19 2003
+++ llvm/lib/CWriter/Writer.cpp Sat May 17 17:26:30 2003
@@ -543,6 +543,7 @@
Out << "/* Provide Declarations */\n";
generateAllocaDecl(Out);
Out << "#include <stdarg.h>\n";
+ Out << "#include <setjmp.h>\n";
// Provide a definition for null if one does not already exist,
// and for `bool' if not compiling with a C++ compiler.
@@ -1022,7 +1023,6 @@
writeOperand(&I.getParent()->getParent()->aback());
Out << ")";
return;
-
case LLVMIntrinsic::va_end:
Out << "va_end((va_list)*";
writeOperand(I.getOperand(1));
@@ -1032,6 +1032,19 @@
Out << "va_copy((va_list)*";
writeOperand(I.getOperand(1));
Out << ", (va_list)";
+ writeOperand(I.getOperand(2));
+ Out << ")";
+ return;
+
+ case LLVMIntrinsic::setjmp:
+ Out << "setjmp((jmp_buf)";
+ writeOperand(I.getOperand(1));
+ Out << ")";
+ return;
+ case LLVMIntrinsic::longjmp:
+ Out << "longjmp((jmp_buf)";
+ writeOperand(I.getOperand(1));
+ Out << ", ";
writeOperand(I.getOperand(2));
Out << ")";
return;
More information about the llvm-commits
mailing list