From: Nate Begeman Date: Sat, 17 Jan 2009 23:56:13 +0000 (+0000) Subject: Allow targets to override IntMaxTWidth X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22b9d5a1fd9067785b62d9237bae6ee2a9b40afc;p=clang Allow targets to override IntMaxTWidth git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62434 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index ce7f7daeb9..ca755b907f 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -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 diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 89bc8b4c8f..2ea1f232bf 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -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;