[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 13 12:15:03 PDT 2003
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.130 -> 1.131
---
Log message:
Use the autoconf macro John wrote
---
Diffs of the changes: (+3 -6)
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.130 llvm/lib/CWriter/Writer.cpp:1.131
--- llvm/lib/CWriter/Writer.cpp:1.130 Sun Oct 12 03:12:58 2003
+++ llvm/lib/CWriter/Writer.cpp Mon Oct 13 12:13:53 2003
@@ -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 @@
// 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 @@
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());
More information about the llvm-commits
mailing list