summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CWriter/Writer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-06 18:04:40 +0000
committerChris Lattner <sabre@nondot.org>2003-08-06 18:04:40 +0000
commit584058220a8303023a1f4f767f30e1402f78c8d5 (patch)
tree803bf670945db039a940d1d299712035b96da0b2 /llvm/lib/CWriter/Writer.cpp
parentc592c9f8a38cc21aea8b77f666816f64c7fe6f03 (diff)
downloadbcm5719-llvm-584058220a8303023a1f4f767f30e1402f78c8d5.tar.gz
bcm5719-llvm-584058220a8303023a1f4f767f30e1402f78c8d5.zip
The HAVE_JUMP code is dead, these intrinsics should _never_ be expanded
llvm-svn: 7642
Diffstat (limited to 'llvm/lib/CWriter/Writer.cpp')
-rw-r--r--llvm/lib/CWriter/Writer.cpp29
1 files changed, 6 insertions, 23 deletions
diff --git a/llvm/lib/CWriter/Writer.cpp b/llvm/lib/CWriter/Writer.cpp
index 404e6f6f55b..5cccc37a3c2 100644
--- a/llvm/lib/CWriter/Writer.cpp
+++ b/llvm/lib/CWriter/Writer.cpp
@@ -1123,32 +1123,15 @@ void CWriter::visitCallInst(CallInst &I) {
return;
case LLVMIntrinsic::setjmp:
-#ifdef HAVE_JUMP
- Out << "setjmp(*(jmp_buf*)";
- writeOperand(I.getOperand(1));
- Out << ")";
-#else
- //
- // For right now, we don't really support non-local jumps. So
- // make setjmp() always evaluate to zero for now.
- //
- Out << "(0)";
-#endif
+ // This instrinsic should never exist in the program, but until we get
+ // setjmp/longjmp transformations going on, we should codegen it to
+ // something reasonable. This will allow code that never calls longjmp
+ // to work.
+ Out << "0";
return;
case LLVMIntrinsic::longjmp:
-#ifdef HAVE_JUMP
- Out << "longjmp(*(jmp_buf*)";
- writeOperand(I.getOperand(1));
- Out << ", ";
- writeOperand(I.getOperand(2));
- Out << ")";
-#else
- //
- // For right now, we don't really support non-local jumps. So
- // make longjmp() abort the program.
- //
+ // Treat longjmp the same as setjmp
Out << "abort()";
-#endif
return;
}
}
OpenPOWER on IntegriCloud