Skip to content

Commit

Permalink
[libc] Fix argument types for {f,}truncate specs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alfredfo authored and thesamesam committed Jun 12, 2023
1 parent 9c053e6 commit 08da9ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libc/spec/posix.td
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def POSIX : StandardSpec<"POSIX"> {
FunctionSpec<
"ftruncate",
RetValSpec<IntType>,
[ArgSpec<ConstCharPtr>, ArgSpec<OffTType>]
[ArgSpec<IntType>, ArgSpec<OffTType>]
>,
FunctionSpec<
"geteuid",
Expand Down Expand Up @@ -580,7 +580,7 @@ def POSIX : StandardSpec<"POSIX"> {
FunctionSpec<
"truncate",
RetValSpec<IntType>,
[ArgSpec<IntType>, ArgSpec<OffTType>]
[ArgSpec<ConstCharPtr>, ArgSpec<OffTType>]
>,
FunctionSpec<
"unlink",
Expand Down

0 comments on commit 08da9ce

Please sign in to comment.