diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-08 08:59:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-08 08:59:43 +0000 |
commit | cd4fc42896f926ffc081e1c4a8bf4cd647883c14 (patch) | |
tree | 9036e5953eb8124ea8024ab1bfd9a429dd692028 /Basic | |
parent | 9e9b6dc3fd413f5341fab54b681420eeb21cd169 (diff) |
make float format handling more regular.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Basic')
-rw-r--r-- | Basic/TargetInfo.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/Basic/TargetInfo.cpp b/Basic/TargetInfo.cpp index 5364affe58..8d4488a777 100644 --- a/Basic/TargetInfo.cpp +++ b/Basic/TargetInfo.cpp @@ -18,24 +18,18 @@ #include "llvm/ADT/STLExtras.h" using namespace clang; -// Out of line virtual dtor for TargetInfo. -TargetInfo::~TargetInfo() {} - -//===----------------------------------------------------------------------===// -// FIXME: These are temporary hacks. - -const llvm::fltSemantics *TargetInfo::getFloatFormat() const { - return &llvm::APFloat::IEEEsingle; -} -const llvm::fltSemantics *TargetInfo::getDoubleFormat() const { - return &llvm::APFloat::IEEEdouble; -} -const llvm::fltSemantics *TargetInfo::getLongDoubleFormat() const { - //Size = 80; Align = 32; // FIXME: implement correctly. - //Format = &llvm::APFloat::x87DoubleExtended; - return &llvm::APFloat::IEEEdouble; +// TargetInfo Constructor. +TargetInfo::TargetInfo(const std::string &T) : Triple(T) { + // Set defaults. These should be overridden by concrete targets as needed. + CharIsSigned = true; + WCharWidth = WCharAlign = 32; + FloatFormat = &llvm::APFloat::IEEEsingle; + DoubleFormat = &llvm::APFloat::IEEEdouble; + LongDoubleFormat = &llvm::APFloat::IEEEdouble; } +// Out of line virtual dtor for TargetInfo. +TargetInfo::~TargetInfo() {} //===----------------------------------------------------------------------===// |