[libc-commits] [PATCH] D76783: [libc] Add a GNU extensions spec containing sincosf from math.h.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Mar 25 10:16:24 PDT 2020


sivachandra created this revision.
sivachandra added a reviewer: abrachet.
Herald added subscribers: libc-commits, tschuett, MaskRay.
Herald added a project: libc-project.
sivachandra added a comment.

This is another part I broke off from my sinf/cosf patch.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76783

Files:
  libc/spec/gnu_ext.td
  libc/spec/spec.td


Index: libc/spec/spec.td
===================================================================
--- libc/spec/spec.td
+++ libc/spec/spec.td
@@ -47,6 +47,7 @@
 // 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">;
Index: libc/spec/gnu_ext.td
===================================================================
--- /dev/null
+++ 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,
+  ];
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76783.252608.patch
Type: text/x-patch
Size: 961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200325/36ded1dc/attachment.bin>


More information about the libc-commits mailing list