[libc-commits] [libc] 63bbddf - [libc][NFC] Add bzero to list of entrypoints.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Mon Jun 8 21:53:45 PDT 2020
Author: Siva Chandra Reddy
Date: 2020-06-08T21:44:39-07:00
New Revision: 63bbddf4cdbd76654fd727c3b8154eaccd2f0398
URL: https://github.com/llvm/llvm-project/commit/63bbddf4cdbd76654fd727c3b8154eaccd2f0398
DIFF: https://github.com/llvm/llvm-project/commit/63bbddf4cdbd76654fd727c3b8154eaccd2f0398.diff
LOG: [libc][NFC] Add bzero to list of entrypoints.
A new LLVM libc specific extension standard spec has been added.
Added:
libc/spec/llvm_libc_ext.td
Modified:
libc/config/linux/api.td
libc/config/linux/x86_64/entrypoints.txt
Removed:
################################################################################
diff --git a/libc/config/linux/api.td b/libc/config/linux/api.td
index 4259fd7d4ff4..5ac6b9db01e9 100644
--- a/libc/config/linux/api.td
+++ b/libc/config/linux/api.td
@@ -2,6 +2,7 @@ include "config/public_api.td"
include "spec/gnu_ext.td"
include "spec/linux.td"
+include "spec/llvm_libc_ext.td"
include "spec/posix.td"
include "spec/stdc.td"
@@ -168,6 +169,7 @@ def MathAPI : PublicAPI<"math.h"> {
def StringAPI : PublicAPI<"string.h"> {
let Functions = [
+ "bzero",
"memcpy",
"memmove",
"memcmp",
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 54fe783795f7..d5ed7a2a187f 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -20,6 +20,7 @@ set(LIBC_ENTRYPOINTS
libc.src.stdlib.abort
# string.h entrypoints
+ libc.src.string.bzero
libc.src.string.memcpy
libc.src.string.strcpy
libc.src.string.strcat
diff --git a/libc/spec/llvm_libc_ext.td b/libc/spec/llvm_libc_ext.td
new file mode 100644
index 000000000000..d8a2b8bdc97b
--- /dev/null
+++ b/libc/spec/llvm_libc_ext.td
@@ -0,0 +1,20 @@
+def LLVMLibcExt : StandardSpec<"llvm_libc_ext"> {
+ HeaderSpec String = HeaderSpec<
+ "string.h",
+ [], // Macros
+ [], // Types
+ [], // Enumerations
+ [
+ FunctionSpec<
+ "bzero",
+ RetValSpec<VoidType>,
+ [ArgSpec<VoidPtr>,
+ ArgSpec<SizeTType>]
+ >,
+ ]
+ >;
+
+ let Headers = [
+ String,
+ ];
+}
More information about the libc-commits
mailing list