From: Chris Lattner Date: Fri, 9 May 2008 05:50:02 +0000 (+0000) Subject: parameterize long long. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec10f5886526124ba733fbd0ef8665d576285daa;p=clang parameterize long long. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50887 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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;