aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-09 05:50:02 +0000
committerChris Lattner <sabre@nondot.org>2008-05-09 05:50:02 +0000
commitec10f5886526124ba733fbd0ef8665d576285daa (patch)
tree62e9a8d7526ea97f3c98a1a4b2c61b7fc4416097
parent8059e997ee05e4aa87f7e21fed630429a140ee53 (diff)
parameterize long long.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50887 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/TargetInfo.h5
-rw-r--r--lib/Basic/TargetInfo.cpp3
2 files changed, 5 insertions, 3 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index dc28e8d2bd..d135fe00ab 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -39,6 +39,7 @@ protected:
unsigned IntWidth, IntAlign;
unsigned DoubleWidth, DoubleAlign;
unsigned LongWidth, LongAlign;
+ unsigned LongLongWidth, LongLongAlign;
const llvm::fltSemantics *FloatFormat, *DoubleFormat, *LongDoubleFormat;
@@ -93,8 +94,8 @@ public:
/// 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.
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp
index 259a6170cd..dd1fe648d4 100644
--- a/lib/Basic/TargetInfo.cpp
+++ b/lib/Basic/TargetInfo.cpp
@@ -24,8 +24,9 @@ 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;
+ LongWidth = LongAlign = 32;
+ LongLongWidth = LongLongAlign = 64;
DoubleWidth = 64;
DoubleAlign = 32;
FloatFormat = &llvm::APFloat::IEEEsingle;