[llvm] r254679 - IR: Update a comment and a bool that've been out of date since 2012
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 17:14:24 PST 2015
Author: bogner
Date: Thu Dec 3 19:14:24 2015
New Revision: 254679
URL: http://llvm.org/viewvc/llvm-project?rev=254679&view=rev
Log:
IR: Update a comment and a bool that've been out of date since 2012
It became impossible to get here with a half in r157393, over 3 years
ago.
Modified:
llvm/trunk/lib/IR/AsmWriter.cpp
Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=254679&r1=254678&r2=254679&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Thu Dec 3 19:14:24 2015
@@ -1108,11 +1108,10 @@ static void WriteConstantInternal(raw_os
// 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_os
"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);
More information about the llvm-commits
mailing list