Use APFloat for the representation of FP immediates, ask the target
for *which* apfloat to use for a particular type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42234 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp
index 6420f0f..cb5588b 100644
--- a/AST/ASTContext.cpp
+++ b/AST/ASTContext.cpp
@@ -190,6 +190,7 @@
case Type::Builtin: {
// FIXME: need to use TargetInfo to derive the target specific sizes. This
// implementation will suffice for play with vector support.
+ const llvm::fltSemantics *F;
switch (cast<BuiltinType>(T)->getKind()) {
default: assert(0 && "Unknown builtin type!");
case BuiltinType::Void:
@@ -207,9 +208,9 @@
case BuiltinType::Long: Target.getLongInfo(Size, Align, L); break;
case BuiltinType::ULongLong:
case BuiltinType::LongLong: Target.getLongLongInfo(Size, Align, L); break;
- case BuiltinType::Float: Target.getFloatInfo(Size, Align, L); break;
- case BuiltinType::Double: Target.getDoubleInfo(Size, Align, L); break;
- case BuiltinType::LongDouble: Target.getLongDoubleInfo(Size, Align,L);break;
+ case BuiltinType::Float: Target.getFloatInfo(Size, Align, F, L); break;
+ case BuiltinType::Double: Target.getDoubleInfo(Size, Align, F, L);break;
+ case BuiltinType::LongDouble:Target.getLongDoubleInfo(Size,Align,F,L);break;
}
break;
}