summaryrefslogtreecommitdiffstats
path: root/clang/Basic/TargetInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-08 08:59:43 +0000
committerChris Lattner <sabre@nondot.org>2008-03-08 08:59:43 +0000
commit1df278669d7a79ff180604d6d9032673dc7e7d3c (patch)
treebd54f033e5c366691d7c4958441b3029586e4fcf /clang/Basic/TargetInfo.cpp
parent7570e9c518b235b06a002bf850357bdb41a17658 (diff)
downloadbcm5719-llvm-1df278669d7a79ff180604d6d9032673dc7e7d3c.tar.gz
bcm5719-llvm-1df278669d7a79ff180604d6d9032673dc7e7d3c.zip
make float format handling more regular.
llvm-svn: 48052
Diffstat (limited to 'clang/Basic/TargetInfo.cpp')
-rw-r--r--clang/Basic/TargetInfo.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/clang/Basic/TargetInfo.cpp b/clang/Basic/TargetInfo.cpp
index 5364affe589..8d4488a7777 100644
--- a/clang/Basic/TargetInfo.cpp
+++ b/clang/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() {}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud