[libc-commits] [libc] 911f2e7 - [libc] Add a GNU extensions spec containing sincosf from math.h.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Wed Mar 25 15:13:59 PDT 2020
Author: Siva Chandra Reddy
Date: 2020-03-25T15:13:22-07:00
New Revision: 911f2e7dc4a4bda533313b054ab073ccaf195d52
URL: https://github.com/llvm/llvm-project/commit/911f2e7dc4a4bda533313b054ab073ccaf195d52
DIFF: https://github.com/llvm/llvm-project/commit/911f2e7dc4a4bda533313b054ab073ccaf195d52.diff
LOG: [libc] Add a GNU extensions spec containing sincosf from math.h.
Reviewers: abrachet
Differential Revision: https://reviews.llvm.org/D76783
Added:
libc/spec/gnu_ext.td
Modified:
libc/spec/spec.td
Removed:
################################################################################
diff --git a/libc/spec/gnu_ext.td b/libc/spec/gnu_ext.td
new file mode 100644
index 000000000000..7ac99783bc47
--- /dev/null
+++ b/libc/spec/gnu_ext.td
@@ -0,0 +1,19 @@
+def GnuExtensions : StandardSpec<"GNUExtensions"> {
+ HeaderSpec Math = HeaderSpec<
+ "math.h",
+ [], // Macros
+ [], // Types
+ [], // Enumerations
+ [
+ FunctionSpec<
+ "sincosf",
+ RetValSpec<VoidType>,
+ [ArgSpec<FloatType>, ArgSpec<FloatPtr>, ArgSpec<FloatPtr>]
+ >,
+ ]
+ >;
+
+ let Headers = [
+ Math,
+ ];
+}
diff --git a/libc/spec/spec.td b/libc/spec/spec.td
index 979efeaf066f..ee04cef277b4 100644
--- a/libc/spec/spec.td
+++ b/libc/spec/spec.td
@@ -47,6 +47,7 @@ def CharType : NamedType<"char">;
// Common types
def VoidPtr : PtrType<VoidType>;
def SizeTType : NamedType<"size_t">;
+def FloatPtr : PtrType<FloatType>;
// _Noreturn is really not a type, but it is convenient to treat it as a type.
def NoReturn : NamedType<"_Noreturn void">;
More information about the libc-commits
mailing list