summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-16 22:43:43 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-16 22:43:43 +0000
commit8eb018ab9c00c504d8b6d991865a599adbd1da02 (patch)
tree0c2978666b992a473ab97522b85289681716c7f4 /clang/lib/CodeGen/CGExpr.cpp
parent45a2a20384f6c74d66f2b5c0b42f083d31deaefc (diff)
downloadbcm5719-llvm-8eb018ab9c00c504d8b6d991865a599adbd1da02.tar.gz
bcm5719-llvm-8eb018ab9c00c504d8b6d991865a599adbd1da02.zip
Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.
- Define pow[lf]?, sqrt[lf]? as builtins. - Add -fmath-errno option which binds to LangOptions.MathErrno - Add new builtin flag Builtin::Context::isConstWithoutErrno for functions which can be marked as const if errno isn't respected for math functions. Sema automatically marks these functions as const when they are defined, if MathErrno=0. - IRgen uses const attribute on sqrt and pow library functions to decide if it can use the llvm intrinsic. llvm-svn: 64689
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 4dc8a9e1d4d..b151dd2102c 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -969,7 +969,7 @@ RValue CodeGenFunction::EmitCallExpr(const CallExpr *E) {
if (const FunctionDecl *FDecl =
dyn_cast<const FunctionDecl>(DRExpr->getDecl()))
if (unsigned builtinID = FDecl->getBuiltinID(getContext()))
- return EmitBuiltinExpr(builtinID, E);
+ return EmitBuiltinExpr(FDecl, builtinID, E);
if (E->getCallee()->getType()->isBlockPointerType())
return EmitBlockCallExpr(E);
OpenPOWER on IntegriCloud