[cfe-commits] r149285 - /cfe/trunk/lib/Basic/Targets.cpp

Nico Weber nicolasweber at gmx.de
Mon Jan 30 14:25:29 PST 2012


Author: nico
Date: Mon Jan 30 16:25:29 2012
New Revision: 149285

URL: http://llvm.org/viewvc/llvm-project?rev=149285&view=rev
Log:
Fix "long double" and __SIZE_TYPE__ on powerpc.

Fixes PR11867. Patch from Jeremy Huddleston!


Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=149285&r1=149284&r2=149285&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Jan 30 16:25:29 2012
@@ -570,7 +570,10 @@
   static const char * const GCCRegNames[];
   static const TargetInfo::GCCRegAlias GCCRegAliases[];
 public:
-  PPCTargetInfo(const std::string& triple) : TargetInfo(triple) {}
+  PPCTargetInfo(const std::string& triple) : TargetInfo(triple) {
+    LongDoubleWidth = LongDoubleAlign = 128;
+    LongDoubleFormat = &llvm::APFloat::PPCDoubleDouble;
+  }
 
   virtual void getTargetBuiltins(const Builtin::Info *&Records,
                                  unsigned &NumRecords) const {
@@ -854,6 +857,7 @@
                         "i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32";
 
     switch (getTriple().getOS()) {
+    case llvm::Triple::Linux:
     case llvm::Triple::FreeBSD:
     case llvm::Triple::NetBSD:
       SizeType = UnsignedInt;





More information about the cfe-commits mailing list