diff options
author | Justin Bogner <mail@justinbogner.com> | 2015-12-04 01:14:24 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2015-12-04 01:14:24 +0000 |
commit | b609b6be743c18ad9092ef9dc892c5afd845a978 (patch) | |
tree | 3b4e247c2ffca43e9117ed1ab1be05b1790f2efe | |
parent | ffb827f2bc31c7c137f8baf419e901dceb027094 (diff) | |
download | bcm5719-llvm-b609b6be743c18ad9092ef9dc892c5afd845a978.tar.gz bcm5719-llvm-b609b6be743c18ad9092ef9dc892c5afd845a978.zip |
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.
llvm-svn: 254679
-rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 759c5a8001c..cb9a792c598 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -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); |