From 4589ed951036c6ac8d56d718aa710f6e6a6fba85 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 9 May 2004 16:03:29 +0000 Subject: [PATCH] Do not emit prototypes for setjmp/longjmp, as they are handled specially git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13437 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CBackend/CBackend.cpp | 3 ++- lib/Target/CBackend/Writer.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 4fe8870dc5e..510e9c76f6f 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -723,7 +723,8 @@ bool CWriter::doInitialization(Module &M) { Out << "\n/* Function Declarations */\n"; for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { // Don't print declarations for intrinsic functions. - if (!I->getIntrinsicID()) { + if (!I->getIntrinsicID() && + I->getName() != "setjmp" && I->getName() != "longjmp") { printFunctionSignature(I, true); if (I->hasWeakLinkage()) Out << " __ATTRIBUTE_WEAK__"; if (I->hasLinkOnceLinkage()) Out << " __ATTRIBUTE_WEAK__"; diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 4fe8870dc5e..510e9c76f6f 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -723,7 +723,8 @@ bool CWriter::doInitialization(Module &M) { Out << "\n/* Function Declarations */\n"; for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { // Don't print declarations for intrinsic functions. - if (!I->getIntrinsicID()) { + if (!I->getIntrinsicID() && + I->getName() != "setjmp" && I->getName() != "longjmp") { printFunctionSignature(I, true); if (I->hasWeakLinkage()) Out << " __ATTRIBUTE_WEAK__"; if (I->hasLinkOnceLinkage()) Out << " __ATTRIBUTE_WEAK__";