aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-09 05:47:41 +0000
committerChris Lattner <sabre@nondot.org>2008-05-09 05:47:41 +0000
commit8059e997ee05e4aa87f7e21fed630429a140ee53 (patch)
tree4ddda004561143f07ed1c79e6646f0fc86b78e54
parentabb575866059c9bb74fe4aa32372f002143fa87c (diff)
correctly parameterize long, patch by Nate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50886 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/TargetInfo.h5
-rw-r--r--lib/Basic/TargetInfo.cpp1
2 files changed, 4 insertions, 2 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index 5a4f1c71d2..dc28e8d2bd 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -38,6 +38,7 @@ protected:
unsigned WCharWidth, WCharAlign;
unsigned IntWidth, IntAlign;
unsigned DoubleWidth, DoubleAlign;
+ unsigned LongWidth, LongAlign;
const llvm::fltSemantics *FloatFormat, *DoubleFormat, *LongDoubleFormat;
@@ -87,8 +88,8 @@ public:
/// getLongWidth/Align - Return the size of 'signed long' and 'unsigned long'
/// for this target, in bits.
- unsigned getLongWidth() const { return 32; } // FIXME
- unsigned getLongAlign() const { return 32; } // FIXME
+ unsigned getLongWidth() const { return LongWidth; }
+ unsigned getLongAlign() const { return LongAlign; }
/// getLongLongWidth/Align - Return the size of 'signed long long' and
/// 'unsigned long long' for this target, in bits.
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp
index 675406edef..259a6170cd 100644
--- a/lib/Basic/TargetInfo.cpp
+++ b/lib/Basic/TargetInfo.cpp
@@ -24,6 +24,7 @@ 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;
DoubleWidth = 64;
DoubleAlign = 32;