Changes in directory llvm/lib/Target/CBackend:
Writer.cpp updated: 1.280.4.2 -> 1.280.4.3 --- Log message: Hack to see branch to label functions as pure and const. Also fixed the creation of function prototypes with extern linkage. --- Diffs of the changes: (+14 -4) Writer.cpp | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.280.4.2 llvm/lib/Target/CBackend/Writer.cpp:1.280.4.3 --- llvm/lib/Target/CBackend/Writer.cpp:1.280.4.2 Mon Mar 19 00:37:44 2007 +++ llvm/lib/Target/CBackend/Writer.cpp Wed May 16 14:49:42 2007 @@ -1247,11 +1247,20 @@ Out << " __ATTRIBUTE_DTOR__"; #if 1 - if ((I->getName() == "exactcheck") || (I->getName() == "exactcheck2") || - (I->getName() == "poolcheck") || - (I->getName() == "poolcheckarray") || (I->getName() == "poolcheckarray_i") || - (I->getName() == "pchk_bounds") || (I->getName() == "pchk_bounds_i")) { + if ((I->getName() == "exactcheck") || + (I->getName() == "exactcheck2") || + (I->getName() == "exactcheck3")) Out << " __attribute__ ((const))"; + if ((I->getName() == "poolcheck") || + (I->getName() == "poolcheckarray") || + (I->getName() == "poolcheckarray_i") || + (I->getName() == "getBounds") || + (I->getName() == "getBounds_i") || + (I->getName() == "getBegin") || + (I->getName() == "getEnd") || + (I->getName() == "pchk_bounds") || + (I->getName() == "pchk_bounds_i")) { + Out << " __attribute__ ((pure))"; } #endif if (I->hasName() && I->getName()[0] == 1) @@ -1453,6 +1462,7 @@ bool isCStructReturn = F->getCallingConv() == CallingConv::CSRet; if (F->hasInternalLinkage()) Out << "static "; + if (F->isExternal()) Out << "extern "; if (F->hasDLLImportLinkage()) Out << "__declspec(dllimport) "; if (F->hasDLLExportLinkage()) Out << "__declspec(dllexport) "; switch (F->getCallingConv()) { _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits