Implement the -enabled-cbe-printf-a feature.
authorReid Spencer <rspencer@reidspencer.com>
Sun, 5 Nov 2006 17:09:41 +0000 (17:09 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sun, 5 Nov 2006 17:09:41 +0000 (17:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31462 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 15bf06a6e2a955160db968251963f6cb75384a47..34671863db231335c2c3755b5c2a1c9d2441c196 100644 (file)
@@ -534,7 +534,7 @@ void CWriter::printConstantPacked(ConstantPacked *CP) {
 // only deal in IEEE FP).
 //
 static bool isFPCSafeToPrint(const ConstantFP *CFP) {
-#if HAVE_PRINTF_A
+#if HAVE_PRINTF_A & ENABLED_CBE_PRINTF_A
   char Buffer[100];
   sprintf(Buffer, "%a", CFP->getValue());
 
@@ -726,7 +726,7 @@ void CWriter::printConstant(Constant *CPV) {
             << " /*inf*/ ";
       } else {
         std::string Num;
-#if HAVE_PRINTF_A
+#if HAVE_PRINTF_A & ENABLE_CBE_PRINTF_A
         // Print out the constant as a floating point number.
         char Buffer[100];
         sprintf(Buffer, "%a", FPC->getValue());
index 15bf06a6e2a955160db968251963f6cb75384a47..34671863db231335c2c3755b5c2a1c9d2441c196 100644 (file)
@@ -534,7 +534,7 @@ void CWriter::printConstantPacked(ConstantPacked *CP) {
 // only deal in IEEE FP).
 //
 static bool isFPCSafeToPrint(const ConstantFP *CFP) {
-#if HAVE_PRINTF_A
+#if HAVE_PRINTF_A & ENABLED_CBE_PRINTF_A
   char Buffer[100];
   sprintf(Buffer, "%a", CFP->getValue());
 
@@ -726,7 +726,7 @@ void CWriter::printConstant(Constant *CPV) {
             << " /*inf*/ ";
       } else {
         std::string Num;
-#if HAVE_PRINTF_A
+#if HAVE_PRINTF_A & ENABLE_CBE_PRINTF_A
         // Print out the constant as a floating point number.
         char Buffer[100];
         sprintf(Buffer, "%a", FPC->getValue());