aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2009-01-17 23:56:13 +0000
committerNate Begeman <natebegeman@mac.com>2009-01-17 23:56:13 +0000
commit22b9d5a1fd9067785b62d9237bae6ee2a9b40afc (patch)
treed0162f381c83800a5976d924261c2d1789d77833
parent45b050e72d058131e6f169fe54888bb91a003fb5 (diff)
Allow targets to override IntMaxTWidth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62434 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/TargetInfo.h4
-rw-r--r--lib/Basic/TargetInfo.cpp1
2 files changed, 3 insertions, 2 deletions
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;