[libc-commits] [libc] 86bebe1 - [lib][Obvious] Fix style in a few include directives.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Tue Feb 15 22:10:22 PST 2022
Author: Siva Chandra Reddy
Date: 2022-02-16T05:57:12Z
New Revision: 86bebe1a90dd447bcfceac97caa0cd5ad8c74043
URL: https://github.com/llvm/llvm-project/commit/86bebe1a90dd447bcfceac97caa0cd5ad8c74043
DIFF: https://github.com/llvm/llvm-project/commit/86bebe1a90dd447bcfceac97caa0cd5ad8c74043.diff
LOG: [lib][Obvious] Fix style in a few include directives.
Added:
Modified:
libc/loader/linux/aarch64/CMakeLists.txt
libc/loader/linux/aarch64/start.cpp
libc/loader/linux/x86_64/CMakeLists.txt
libc/loader/linux/x86_64/start.cpp
libc/src/__support/OSUtil/linux/io.h
libc/src/__support/OSUtil/linux/quick_exit.h
Removed:
################################################################################
diff --git a/libc/loader/linux/aarch64/CMakeLists.txt b/libc/loader/linux/aarch64/CMakeLists.txt
index c8fa53bf3d753..716930aa70990 100644
--- a/libc/loader/linux/aarch64/CMakeLists.txt
+++ b/libc/loader/linux/aarch64/CMakeLists.txt
@@ -6,7 +6,6 @@ add_loader_object(
libc.config.linux.app_h
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
- libc.src.string.memcpy
COMPILE_OPTIONS
-fno-omit-frame-pointer
-ffreestanding # To avoid compiler warnings about calling the main function.
diff --git a/libc/loader/linux/aarch64/start.cpp b/libc/loader/linux/aarch64/start.cpp
index c8ee619e12b30..5b853a4e197c5 100644
--- a/libc/loader/linux/aarch64/start.cpp
+++ b/libc/loader/linux/aarch64/start.cpp
@@ -7,12 +7,12 @@
//===----------------------------------------------------------------------===//
#include "config/linux/app.h"
-#include "include/sys/syscall.h"
#include "src/__support/OSUtil/syscall.h"
#include <linux/auxvec.h>
#include <linux/elf.h>
#include <stdint.h>
+#include <sys/syscall.h>
extern "C" int main(int, char **, char **);
diff --git a/libc/loader/linux/x86_64/CMakeLists.txt b/libc/loader/linux/x86_64/CMakeLists.txt
index c8fa53bf3d753..e445e30b61979 100644
--- a/libc/loader/linux/x86_64/CMakeLists.txt
+++ b/libc/loader/linux/x86_64/CMakeLists.txt
@@ -4,6 +4,7 @@ add_loader_object(
start.cpp
DEPENDS
libc.config.linux.app_h
+ libc.include.sys_mman
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
libc.src.string.memcpy
diff --git a/libc/loader/linux/x86_64/start.cpp b/libc/loader/linux/x86_64/start.cpp
index 574a8f435430d..46b6da6f908f1 100644
--- a/libc/loader/linux/x86_64/start.cpp
+++ b/libc/loader/linux/x86_64/start.cpp
@@ -7,8 +7,6 @@
//===----------------------------------------------------------------------===//
#include "config/linux/app.h"
-#include "include/sys/mman.h"
-#include "include/sys/syscall.h"
#include "src/__support/OSUtil/syscall.h"
#include "src/string/memcpy.h"
@@ -16,6 +14,8 @@
#include <linux/auxvec.h>
#include <linux/elf.h>
#include <stdint.h>
+#include <sys/mman.h>
+#include <sys/syscall.h>
extern "C" int main(int, char **, char **);
diff --git a/libc/src/__support/OSUtil/linux/io.h b/libc/src/__support/OSUtil/linux/io.h
index 71830476bfff1..fa63ecda831fb 100644
--- a/libc/src/__support/OSUtil/linux/io.h
+++ b/libc/src/__support/OSUtil/linux/io.h
@@ -9,10 +9,11 @@
#ifndef LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_IO_H
#define LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_IO_H
-#include "include/sys/syscall.h" // For syscall numbers.
#include "src/string/string_utils.h"
#include "syscall.h" // For internal syscall function.
+#include <sys/syscall.h> // For syscall numbers.
+
namespace __llvm_libc {
static inline void write_to_stderr(const char *msg) {
diff --git a/libc/src/__support/OSUtil/linux/quick_exit.h b/libc/src/__support/OSUtil/linux/quick_exit.h
index eb9d86f446cfe..c985c630be35a 100644
--- a/libc/src/__support/OSUtil/linux/quick_exit.h
+++ b/libc/src/__support/OSUtil/linux/quick_exit.h
@@ -9,9 +9,10 @@
#ifndef LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_QUICK_EXIT_H
#define LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_QUICK_EXIT_H
-#include "include/sys/syscall.h" // For syscall numbers.
#include "syscall.h" // For internal syscall function.
+#include <sys/syscall.h> // For syscall numbers.
+
namespace __llvm_libc {
static inline void quick_exit(int status) {
More information about the libc-commits
mailing list