Don't generate a prototype for _setjmp. At least on Linux, this function
authorReid Spencer <rspencer@reidspencer.com>
Sun, 22 Oct 2006 09:58:21 +0000 (09:58 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sun, 22 Oct 2006 09:58:21 +0000 (09:58 +0000)
has a different prototype than the one #included from <setjmp.h>. This
patch fixes siod and a number of other test cases on Linux that were
failing the CBE because of this _setjmp issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31112 91177308-0d34-0410-b5e6-96231b3b80d8

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

index f31f92018b8a71131bee9215a4b4684dcdcda637..bc2f7bd5f1f86707e5d077e470e240f893947388 100644 (file)
@@ -1075,8 +1075,8 @@ bool CWriter::doInitialization(Module &M) {
   
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
     // Don't print declarations for intrinsic functions.
-    if (!I->getIntrinsicID() &&
-        I->getName() != "setjmp" && I->getName() != "longjmp") {
+    if (!I->getIntrinsicID() && I->getName() != "setjmp" && 
+        I->getName() != "longjmp" && I->getName() != "_setjmp") {
       printFunctionSignature(I, true);
       if (I->hasWeakLinkage() || I->hasLinkOnceLinkage()) 
         Out << " __ATTRIBUTE_WEAK__";
index f31f92018b8a71131bee9215a4b4684dcdcda637..bc2f7bd5f1f86707e5d077e470e240f893947388 100644 (file)
@@ -1075,8 +1075,8 @@ bool CWriter::doInitialization(Module &M) {
   
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
     // Don't print declarations for intrinsic functions.
-    if (!I->getIntrinsicID() &&
-        I->getName() != "setjmp" && I->getName() != "longjmp") {
+    if (!I->getIntrinsicID() && I->getName() != "setjmp" && 
+        I->getName() != "longjmp" && I->getName() != "_setjmp") {
       printFunctionSignature(I, true);
       if (I->hasWeakLinkage() || I->hasLinkOnceLinkage()) 
         Out << " __ATTRIBUTE_WEAK__";