[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / libc / src / sys / stat / linux / lstat.cpp
blob816760a8c1452812ca2cd35d088fac8124755b9f
1 //===-- Linux implementation of lstat -------------------------------------===//
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/sys/stat/lstat.h"
10 #include "kernel_statx.h"
12 #include "src/__support/OSUtil/syscall.h" // For internal syscall function.
13 #include "src/__support/common.h"
15 #include <fcntl.h>
16 #include <sys/stat.h>
18 namespace __llvm_libc {
20 LLVM_LIBC_FUNCTION(int, lstat,
21 (const char *__restrict path,
22 struct stat *__restrict statbuf)) {
23 return statx(AT_FDCWD, path, AT_SYMLINK_NOFOLLOW, statbuf);
26 } // namespace __llvm_libc