[libc-commits] [libc] 08da9ce - [libc] Fix argument types for {f, }truncate specs
Sam James via libc-commits
libc-commits at lists.llvm.org
Mon Jun 12 10:00:42 PDT 2023
Author: Alfred Persson Forsberg
Date: 2023-06-12T18:00:35+01:00
New Revision: 08da9ceb647551d266d34ebdce47e6ca62a31ae0
URL: https://github.com/llvm/llvm-project/commit/08da9ceb647551d266d34ebdce47e6ca62a31ae0
DIFF: https://github.com/llvm/llvm-project/commit/08da9ceb647551d266d34ebdce47e6ca62a31ae0.diff
LOG: [libc] Fix argument types for {f,}truncate specs
The current argument types are currently switched around for ftruncate
and truncate. Currently passes tests because the internal definitions
inside the __llvm_libc namespace are fine.
Reviewed By: michaelrj, thesamesam, sivachandra
Differential Revision: https://reviews.llvm.org/D152664
Added:
Modified:
libc/spec/posix.td
Removed:
################################################################################
diff --git a/libc/spec/posix.td b/libc/spec/posix.td
index ee17de8c170c0..54c6eb5f4c242 100644
--- a/libc/spec/posix.td
+++ b/libc/spec/posix.td
@@ -425,7 +425,7 @@ def POSIX : StandardSpec<"POSIX"> {
FunctionSpec<
"ftruncate",
RetValSpec<IntType>,
- [ArgSpec<ConstCharPtr>, ArgSpec<OffTType>]
+ [ArgSpec<IntType>, ArgSpec<OffTType>]
>,
FunctionSpec<
"geteuid",
@@ -580,7 +580,7 @@ def POSIX : StandardSpec<"POSIX"> {
FunctionSpec<
"truncate",
RetValSpec<IntType>,
- [ArgSpec<IntType>, ArgSpec<OffTType>]
+ [ArgSpec<ConstCharPtr>, ArgSpec<OffTType>]
>,
FunctionSpec<
"unlink",
More information about the libc-commits
mailing list