llvm-project/libc/spec/llvm_libc_ext.td
Siva Chandra Reddy 3e1986682f [libc][Obvious] Add "__" prefix to sched_getcpucount in the spec and elsewhere.
Without this fix, the declaration in sched.h will not have the "__" prefix and
will cause a compile failure.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D135286
2022-10-05 18:01:13 +00:00

56 lines
1.2 KiB
TableGen

def LLVMLibcExt : StandardSpec<"llvm_libc_ext"> {
HeaderSpec String = HeaderSpec<
"string.h",
[], // Macros
[], // Types
[], // Enumerations
[
FunctionSpec<
"bzero",
RetValSpec<VoidType>,
[ArgSpec<VoidPtr>, ArgSpec<SizeTType>]
>,
FunctionSpec<
"bcmp",
RetValSpec<IntType>,
[ArgSpec<ConstVoidPtr>, ArgSpec<ConstVoidPtr>, ArgSpec<SizeTType>]
>,
]
>;
HeaderSpec Assert = HeaderSpec<
"assert.h",
[], // Macros
[], // Types
[], // Enumerations
[
FunctionSpec<
"__assert_fail",
RetValSpec<NoReturn>,
[ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>, ArgSpec<UnsignedType>, ArgSpec<ConstCharPtr>]
>,
]
>;
HeaderSpec Sched = HeaderSpec<
"sched.h",
[], // Macros
[PidT, SizeTType, CpuSetT], // Types
[], // Enumerations
[
FunctionSpec<
"__sched_getcpucount",
RetValSpec<IntType>,
[ArgSpec<SizeTType>, ArgSpec<ConstCpuSetPtr>]
>,
]
>;
let Headers = [
String,
Sched,
Assert,
];
}