From 9506b0d6e2b9f9c8e96305775ca039131a97d8c2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 13 Oct 2003 17:13:53 +0000 Subject: [PATCH] Use the autoconf macro John wrote llvm-svn: 9095 --- lib/CWriter/Writer.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/CWriter/Writer.cpp b/lib/CWriter/Writer.cpp index 33981245ced..dea97e92f90 100644 --- a/lib/CWriter/Writer.cpp +++ b/lib/CWriter/Writer.cpp @@ -20,13 +20,10 @@ #include "llvm/Support/Mangler.h" #include "Support/StringExtras.h" #include "Support/STLExtras.h" +#include "Config/config.h" #include #include - -/* FIXME: This should be autoconf'd! */ -#define HAS_C99_HEXADECIMAL_CONSTANTS 1 - namespace { class CWriter : public Pass, public InstVisitor { std::ostream &Out; @@ -341,7 +338,7 @@ void CWriter::printConstantArray(ConstantArray *CPA) { // only deal in IEEE FP). // static bool isFPCSafeToPrint(const ConstantFP *CFP) { -#if HAS_C99_HEXADECIMAL_CONSTANTS +#if HAVE_PRINTF_A char Buffer[100]; sprintf(Buffer, "%a", CFP->getValue()); @@ -457,7 +454,7 @@ void CWriter::printConstant(Constant *CPV) { Out << "(*(" << (FPC->getType() == Type::FloatTy ? "float" : "double") << "*)&FPConstant" << I->second << ")"; } else { -#if HAS_C99_HEXADECIMAL_CONSTANTS +#if HAVE_PRINTF_A // Print out the constant as a floating point number. char Buffer[100]; sprintf(Buffer, "%a", FPC->getValue());