[libc] Add a GNU extensions spec containing sincosf from math.h.

Reviewers: abrachet

Differential Revision: https://reviews.llvm.org/D76783
This commit is contained in:
Siva Chandra Reddy 2020-03-24 22:29:11 -07:00
parent 4b428e8f18
commit 911f2e7dc4
2 changed files with 20 additions and 0 deletions

19
libc/spec/gnu_ext.td Normal file
View File

@ -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,
];
}

View 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">;