[libc] Add a GNU extensions spec containing sincosf from math.h.
authorSiva Chandra Reddy <sivachandra@google.com>
Wed, 25 Mar 2020 05:29:11 +0000 (22:29 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Wed, 25 Mar 2020 22:13:22 +0000 (15:13 -0700)
Reviewers: abrachet

Differential Revision: https://reviews.llvm.org/D76783

libc/spec/gnu_ext.td [new file with mode: 0644]
libc/spec/spec.td

diff --git a/libc/spec/gnu_ext.td b/libc/spec/gnu_ext.td
new file mode 100644 (file)
index 0000000..7ac9978
--- /dev/null
@@ -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,
+  ];
+}
index 979efea..ee04cef 100644 (file)
@@ -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">;