Temporarily disable this code, as it is emitting LLVM_NAN("nan") which results in...
authorChris Lattner <sabre@nondot.org>
Sun, 25 Jul 2004 22:36:35 +0000 (22:36 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 25 Jul 2004 22:36:35 +0000 (22:36 +0000)
glibc 'nan' function because the initializer is not a string.  This breaks when used in a global
initializer.  Try compiling this testcase for example:

%X = global float <some nan value>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15223 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 926f72dfe3af4b6d7071531717ca4d6505e6026d..65a110e567ee3f0c8785d92f168eb5cd1cf97032 100644 (file)
@@ -570,9 +570,9 @@ void CWriter::printConstant(Constant *CPV) {
       if (IsNAN(FPC->getValue())) {
         // The value is NaN
         if (FPC->getType() == Type::FloatTy)
-          Out << "LLVM_NANF(\"" << Num << "\") /*nan*/ ";
+          Out << "LLVM_NANF(\"0\") /*nan*/ ";
         else
-          Out << "LLVM_NAN(\"" << Num << "\") /*nan*/ ";
+          Out << "LLVM_NAN(\"0\") /*nan*/ ";
       } else if (IsInf(FPC->getValue())) {
         // The value is Inf
         if (FPC->getValue() < 0) Out << "-";
index 926f72dfe3af4b6d7071531717ca4d6505e6026d..65a110e567ee3f0c8785d92f168eb5cd1cf97032 100644 (file)
@@ -570,9 +570,9 @@ void CWriter::printConstant(Constant *CPV) {
       if (IsNAN(FPC->getValue())) {
         // The value is NaN
         if (FPC->getType() == Type::FloatTy)
-          Out << "LLVM_NANF(\"" << Num << "\") /*nan*/ ";
+          Out << "LLVM_NANF(\"0\") /*nan*/ ";
         else
-          Out << "LLVM_NAN(\"" << Num << "\") /*nan*/ ";
+          Out << "LLVM_NAN(\"0\") /*nan*/ ";
       } else if (IsInf(FPC->getValue())) {
         // The value is Inf
         if (FPC->getValue() < 0) Out << "-";