]> granicus.if.org Git - clang/commitdiff
Allow targets to override IntMaxTWidth
authorNate Begeman <natebegeman@mac.com>
Sat, 17 Jan 2009 23:56:13 +0000 (23:56 +0000)
committerNate Begeman <natebegeman@mac.com>
Sat, 17 Jan 2009 23:56:13 +0000 (23:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62434 91177308-0d34-0410-b5e6-96231b3b80d8

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

index ce7f7daeb9c308b308e01b42fe1d24558c4fed86..ca755b907fa1a694bf941fc460642a9215cc5350 100644 (file)
@@ -44,6 +44,7 @@ protected:
   unsigned char LongDoubleWidth, LongDoubleAlign;
   unsigned char LongWidth, LongAlign;
   unsigned char LongLongWidth, LongLongAlign;
+  unsigned char IntMaxTWidth;
   const char *DescriptionString;
   const char *UserLabelPrefix;
   const llvm::fltSemantics *FloatFormat, *DoubleFormat, *LongDoubleFormat;
@@ -150,8 +151,7 @@ public:
   /// getIntMaxTWidth - Return the size of intmax_t and uintmax_t for this
   /// target, in bits.  
   unsigned getIntMaxTWidth() const {
-    // FIXME: implement correctly.
-    return 64;
+    return IntMaxTWidth;
   }
   
   /// getUserLabelPrefix - This returns the default value of the
index 89bc8b4c8f9db2a644b5a19410e51eb08fea4a95..2ea1f232bfde6b5af1cf9c9e3bbdaa881471a3d2 100644 (file)
@@ -34,6 +34,7 @@ TargetInfo::TargetInfo(const std::string &T) : Triple(T) {
   DoubleAlign = 64;
   LongDoubleWidth = 64;
   LongDoubleAlign = 64;
+  IntMaxTWidth = 64;
   SizeType = UnsignedLong;
   PtrDiffType = SignedLong;
   IntMaxType = SignedLongLong;