Do not emit prototypes for setjmp/longjmp, as they are handled specially
authorChris Lattner <sabre@nondot.org>
Sun, 9 May 2004 16:03:29 +0000 (16:03 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 9 May 2004 16:03:29 +0000 (16:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13437 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index 4fe8870dc5e70f78fb203a384be3fdd8669676ce..510e9c76f6f10215513c01750af7e64cfa30d778 100644 (file)
@@ -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__";
index 4fe8870dc5e70f78fb203a384be3fdd8669676ce..510e9c76f6f10215513c01750af7e64cfa30d778 100644 (file)
@@ -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__";