[llvm-commits] [dragonegg] r173147 - /dragonegg/trunk/src/Convert.cpp

Duncan Sands baldrick at free.fr
Tue Jan 22 03:07:42 PST 2013


Author: baldrick
Date: Tue Jan 22 05:07:42 2013
New Revision: 173147

URL: http://llvm.org/viewvc/llvm-project?rev=173147&view=rev
Log:
Fix compilation after recent LLVM APFloat change. Based on a patch by chapuni64.

Modified:
    dragonegg/trunk/src/Convert.cpp

Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=173147&r1=173146&r2=173147&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Tue Jan 22 05:07:42 2013
@@ -6634,8 +6634,8 @@
   if (BYTES_BIG_ENDIAN)
     std::reverse(Parts, Parts + Words);
 
-  bool isPPC_FP128 = ConvertType(TREE_TYPE(reg))->isPPC_FP128Ty();
-  if (isPPC_FP128) {
+  Type *Ty = getRegType(TREE_TYPE(reg));
+  if (Ty->isPPC_FP128Ty()) {
     // This type is actually a pair of doubles in disguise.  They turn up the
     // wrong way round here, so flip them.
     assert(FLOAT_WORDS_BIG_ENDIAN && "PPC not big endian!");
@@ -6646,7 +6646,7 @@
   // Form an APInt from the buffer, an APFloat from the APInt, and the desired
   // floating point constant from the APFloat, phew!
   const APInt &I = APInt(Precision, Words, Parts);
-  return ConstantFP::get(Context, APFloat(I, !isPPC_FP128));
+  return ConstantFP::get(Context, APFloat(Ty->getFltSemantics(), I));
 }
 
 /// EmitConstantVectorConstructor - Turn the given constant CONSTRUCTOR into





More information about the llvm-commits mailing list