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

Chris Lattner sabre at nondot.org
Thu May 8 22:50:03 PDT 2008


Author: lattner
Date: Fri May  9 00:50:02 2008
New Revision: 50887

URL: http://llvm.org/viewvc/llvm-project?rev=50887&view=rev
Log:
parameterize long long.

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=50887&r1=50886&r2=50887&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Fri May  9 00:50:02 2008
@@ -39,6 +39,7 @@
   unsigned IntWidth, IntAlign;
   unsigned DoubleWidth, DoubleAlign;
   unsigned LongWidth, LongAlign;
+  unsigned LongLongWidth, LongLongAlign;
   
   const llvm::fltSemantics *FloatFormat, *DoubleFormat, *LongDoubleFormat;
 
@@ -93,8 +94,8 @@
   
   /// getLongLongWidth/Align - Return the size of 'signed long long' and
   /// 'unsigned long long' for this target, in bits.
-  unsigned getLongLongWidth() const { return 64; } // FIXME
-  unsigned getLongLongAlign() const { return 64; } // FIXME
+  unsigned getLongLongWidth() const { return LongLongWidth; }
+  unsigned getLongLongAlign() const { return LongLongAlign; }
   
   /// getWcharWidth/Align - Return the size of 'wchar_t' 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=50887&r1=50886&r2=50887&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/lib/Basic/TargetInfo.cpp Fri May  9 00:50:02 2008
@@ -24,8 +24,9 @@
   // Set defaults.  These should be overridden by concrete targets as needed.
   CharIsSigned = true;
   WCharWidth = WCharAlign = 32;
-  LongWidth = LongAlign = 32;
   IntWidth = IntAlign = 32;
+  LongWidth = LongAlign = 32;
+  LongLongWidth = LongLongAlign = 64;
   DoubleWidth = 64;
   DoubleAlign = 32;
   FloatFormat = &llvm::APFloat::IEEEsingle;





More information about the cfe-commits mailing list