From b7cfe88e88cb4f46308de89cf3f0c81bfe624128 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 30 Jun 2008 18:32:54 +0000 Subject: Make a few related changes: 1) add a new ASTContext::getFloatTypeSemantics method. 2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places. 3) Change the TargetInfo.h get*Format methods to return their fltSemantics byref instead of by pointer. 4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which sometimes expand specially and othertimes fall back to libm. 5) Add support for __builtin_nan("") to codegen, cases that don't pass in an empty string are currently lowered to libm calls. 6) Fix codegen of __builtin_infl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52914 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index ce49cb20d3..5a4236a42c 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -613,7 +613,7 @@ Value *ScalarExprEmitter::VisitPrePostIncDec(const UnaryOperator *E, llvm::ConstantFP::get(llvm::APFloat(static_cast(AmountVal))); else { llvm::APFloat F(static_cast(AmountVal)); - F.convert(*CGF.Target.getLongDoubleFormat(), llvm::APFloat::rmTowardZero); + F.convert(CGF.Target.getLongDoubleFormat(), llvm::APFloat::rmTowardZero); NextVal = llvm::ConstantFP::get(F); } NextVal = Builder.CreateAdd(InVal, NextVal, isInc ? "inc" : "dec"); -- cgit v1.2.3