diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-16 22:43:43 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-16 22:43:43 +0000 |
commit | ef2abfee3ea16ec74942dc09e9e425f46aeb2582 (patch) | |
tree | a1fd544522e1d5e2708b9b2a6df1704a0734d0bd /include/clang/Basic/LangOptions.h | |
parent | f592c929bd1f083abcc8199b24bb825fdd28df1c (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64689 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/LangOptions.h')
-rw-r--r-- | include/clang/Basic/LangOptions.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h index 12fffb332d..0124b04aa9 100644 --- a/include/clang/Basic/LangOptions.h +++ b/include/clang/Basic/LangOptions.h @@ -54,6 +54,9 @@ public: unsigned Blocks : 1; // block extension to C unsigned EmitAllDecls : 1; // Emit all declarations, even if // they are unused. + unsigned MathErrno : 1; // Math functions must respect errno + // (modulo the platform support). + private: unsigned GC : 2; // Objective-C Garbage Collection modes. We declare // this enum as unsigned because MSVC insists on making enums @@ -76,6 +79,7 @@ public: ThreadsafeStatics = 0; Blocks = 0; EmitAllDecls = 0; + MathErrno = 1; } GCMode getGCMode() const { return (GCMode) GC; } |