aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2008-04-18 05:41:31 +0000
committerNate Begeman <natebegeman@mac.com>2008-04-18 05:41:31 +0000
commitc8b1227fa8c17d9881815e40c04e19334be536f8 (patch)
tree7ec287cfe0e7cf879e52767b4a4753d69ff9a439 /include/clang/Basic
parentbef5c8bf65bf9a1ae7bf0d6630e17cf3eeae8cc4 (diff)
Allow targets to override double size, alignment, and semantics, and tie this
information into the IR type codegen. This allows a target to codegen the C 'double' type as either double or float. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/TargetInfo.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index ca8ac8c6a0..cd71759440 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -36,6 +36,8 @@ protected:
// values are specified by the TargetInfo constructor.
bool CharIsSigned;
unsigned WCharWidth, WCharAlign;
+ unsigned DoubleWidth, DoubleAlign;
+
const llvm::fltSemantics *FloatFormat, *DoubleFormat, *LongDoubleFormat;
// TargetInfo Constructor. Default initializes all fields.
@@ -103,8 +105,8 @@ public:
const llvm::fltSemantics *getFloatFormat() const { return FloatFormat; }
/// getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
- unsigned getDoubleWidth() const { return 64; } // FIXME
- unsigned getDoubleAlign() const { return 32; } // FIXME
+ unsigned getDoubleWidth() const { return DoubleWidth; }
+ unsigned getDoubleAlign() const { return DoubleAlign; }
const llvm::fltSemantics *getDoubleFormat() const { return DoubleFormat; }
/// getLongDoubleWidth/Align/Format - Return the size/align/format of 'long