]> granicus.if.org Git - clang/commitdiff
correctly parameterize long, patch by Nate.
authorChris Lattner <sabre@nondot.org>
Fri, 9 May 2008 05:47:41 +0000 (05:47 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 9 May 2008 05:47:41 +0000 (05:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50886 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TargetInfo.h
lib/Basic/TargetInfo.cpp

index 5a4f1c71d20b0e9ab2e5ab621b99e983b43a83e0..dc28e8d2bd262c2477912ada064dcacce7a85b8a 100644 (file)
@@ -38,6 +38,7 @@ protected:
   unsigned WCharWidth, WCharAlign;
   unsigned IntWidth, IntAlign;
   unsigned DoubleWidth, DoubleAlign;
+  unsigned LongWidth, LongAlign;
   
   const llvm::fltSemantics *FloatFormat, *DoubleFormat, *LongDoubleFormat;
 
@@ -87,8 +88,8 @@ public:
   
   /// 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.
index 675406edef3f686313beac9cea9d562d7661bba1..259a6170cd82551b2f666f50d495dd2ce4603380 100644 (file)
@@ -24,6 +24,7 @@ TargetInfo::TargetInfo(const std::string &T) : Triple(T) {
   // 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;