aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-13 17:13:53 +0000
committerChris Lattner <sabre@nondot.org>2003-10-13 17:13:53 +0000
commit4946a8cf56325e90999a078fa406b5af60061aa2 (patch)
tree719c35db719876ae1d957f255ef6526b8680ba7f /lib/Target/CBackend/CBackend.cpp
parent8b716f66ad7606b38e5393bd67344235936d2f2c (diff)
Use the autoconf macro John wrote
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9095 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r--lib/Target/CBackend/CBackend.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 33981245ce..dea97e92f9 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -20,13 +20,10 @@
#include "llvm/Support/Mangler.h"
#include "Support/StringExtras.h"
#include "Support/STLExtras.h"
+#include "Config/config.h"
#include <algorithm>
#include <sstream>
-
-/* FIXME: This should be autoconf'd! */
-#define HAS_C99_HEXADECIMAL_CONSTANTS 1
-
namespace {
class CWriter : public Pass, public InstVisitor<CWriter> {
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());