IR: Update a comment and a bool that've been out of date since 2012
authorJustin Bogner <mail@justinbogner.com>
Fri, 4 Dec 2015 01:14:24 +0000 (01:14 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 4 Dec 2015 01:14:24 +0000 (01:14 +0000)
It became impossible to get here with a half in r157393, over 3 years
ago.

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

lib/IR/AsmWriter.cpp

index 759c5a8001c00158947e1b701e787f7b95812c4b..cb9a792c598ba0f597da2b79743363790b875a10 100644 (file)
@@ -1108,11 +1108,10 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
       // the value back and get the same value.
       //
       bool ignored;
-      bool isHalf = &CFP->getValueAPF().getSemantics()==&APFloat::IEEEhalf;
       bool isDouble = &CFP->getValueAPF().getSemantics()==&APFloat::IEEEdouble;
       bool isInf = CFP->getValueAPF().isInfinity();
       bool isNaN = CFP->getValueAPF().isNaN();
-      if (!isHalf && !isInf && !isNaN) {
+      if (!isInf && !isNaN) {
         double Val = isDouble ? CFP->getValueAPF().convertToDouble() :
                                 CFP->getValueAPF().convertToFloat();
         SmallString<128> StrVal;
@@ -1140,7 +1139,7 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
                     "assuming that double is 64 bits!");
       char Buffer[40];
       APFloat apf = CFP->getValueAPF();
-      // Halves and floats are represented in ASCII IR as double, convert.
+      // Floats are represented in ASCII IR as double, convert.
       if (!isDouble)
         apf.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven,
                           &ignored);