Revert "[InstCombine] Support gep nuw in icmp folds" (#118698)
[llvm-project.git] / libc / src / unistd / linux / getppid.cpp
blobc55329daa9f9d9fb373844d5e5be70424ccfebbc
1 //===-- Linux implementation of getppid -----------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "src/unistd/getppid.h"
11 #include "src/__support/OSUtil/syscall.h" // For internal syscall function.
12 #include "src/__support/common.h"
13 #include "src/__support/macros/config.h"
15 #include <sys/syscall.h> // For syscall numbers.
17 namespace LIBC_NAMESPACE_DECL {
19 LLVM_LIBC_FUNCTION(pid_t, getppid, ()) {
20 return LIBC_NAMESPACE::syscall_impl<pid_t>(SYS_getppid);
23 } // namespace LIBC_NAMESPACE_DECL