[cfe-commits] r50886 - in /cfe/trunk: include/clang/Basic/TargetInfo.h lib/Basic/TargetInfo.cpp

Chris Lattner sabre at nondot.org
Thu May 8 22:47:41 PDT 2008


Author: lattner
Date: Fri May  9 00:47:41 2008
New Revision: 50886

URL: http://llvm.org/viewvc/llvm-project?rev=50886&view=rev
Log:
correctly parameterize long, patch by Nate.

Modified:
    cfe/trunk/include/clang/Basic/TargetInfo.h
    cfe/trunk/lib/Basic/TargetInfo.cpp

Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=50886&r1=50885&r2=50886&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Fri May  9 00:47:41 2008
@@ -38,6 +38,7 @@
   unsigned WCharWidth, WCharAlign;
   unsigned IntWidth, IntAlign;
   unsigned DoubleWidth, DoubleAlign;
+  unsigned LongWidth, LongAlign;
   
   const llvm::fltSemantics *FloatFormat, *DoubleFormat, *LongDoubleFormat;
 
@@ -87,8 +88,8 @@
   
   /// getLongWidth/Align - Return the size of 'signed long' and 'unsigned long'
   /// for this target, in bits.
-  unsigned getLongWidth() const { return 32; } // FIXME
-  unsigned getLongAlign() const { return 32; } // FIXME
+  unsigned getLongWidth() const { return LongWidth; }
+  unsigned getLongAlign() const { return LongAlign; }
   
   /// getLongLongWidth/Align - Return the size of 'signed long long' and
   /// 'unsigned long long' for this target, in bits.

Modified: cfe/trunk/lib/Basic/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/TargetInfo.cpp?rev=50886&r1=50885&r2=50886&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/lib/Basic/TargetInfo.cpp Fri May  9 00:47:41 2008
@@ -24,6 +24,7 @@
   // Set defaults.  These should be overridden by concrete targets as needed.
   CharIsSigned = true;
   WCharWidth = WCharAlign = 32;
+  LongWidth = LongAlign = 32;
   IntWidth = IntAlign = 32;
   DoubleWidth = 64;
   DoubleAlign = 32;





More information about the cfe-commits mailing list