diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2006-12-10 23:12:42 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2006-12-10 23:12:42 +0000 |
commit | 3b7c257cae5fe1d24a8da76dbbdaf01576d2451d (patch) | |
tree | fbabbcbb422fd7637342cc35b8648145bee56536 /llvm/lib/Target/CBackend | |
parent | 6161452b67134a1913e164519f6bac6493771e2d (diff) | |
download | bcm5719-llvm-3b7c257cae5fe1d24a8da76dbbdaf01576d2451d.tar.gz bcm5719-llvm-3b7c257cae5fe1d24a8da76dbbdaf01576d2451d.zip |
Cleaned setjmp/longjmp lowering interfaces. Now we're producing right
code (both asm & cbe) for Mingw32 target.
Removed autoconf checks for underscored versions of setjmp/longjmp.
llvm-svn: 32415
Diffstat (limited to 'llvm/lib/Target/CBackend')
-rw-r--r-- | llvm/lib/Target/CBackend/Writer.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp index 3cfd6d0386a..250ffc1fb50 100644 --- a/llvm/lib/Target/CBackend/Writer.cpp +++ b/llvm/lib/Target/CBackend/Writer.cpp @@ -1136,6 +1136,8 @@ static void generateCompilerSpecificCode(std::ostream& Out) { << "#elif defined(__APPLE__)\n" << "extern void *__builtin_alloca(unsigned long);\n" << "#define alloca(x) __builtin_alloca(x)\n" + << "#define longjmp _longjmp\n" + << "#define setjmp _setjmp\n" << "#elif defined(__sun__)\n" << "#if defined(__sparcv9)\n" << "extern void *__builtin_alloca(unsigned long);\n" @@ -2141,17 +2143,11 @@ void CWriter::visitCallInst(CallInst &I) { Out << ')'; return; case Intrinsic::setjmp: -#if defined(HAVE__SETJMP) && defined(HAVE__LONGJMP) - Out << "_"; // Use _setjmp on systems that support it! -#endif Out << "setjmp(*(jmp_buf*)"; writeOperand(I.getOperand(1)); Out << ')'; return; case Intrinsic::longjmp: -#if defined(HAVE__SETJMP) && defined(HAVE__LONGJMP) - Out << "_"; // Use _longjmp on systems that support it! -#endif Out << "longjmp(*(jmp_buf*)"; writeOperand(I.getOperand(1)); Out << ", "; |